Cabal - C sources in a subdirectory

Einar Karttunen ekarttun at
Tue Nov 16 03:18:59 EST 2004


I have problems with Cabal failing to build simple packages
if C-Sources are inside a subdirectory.

With a Setup.description like:

Name: Foo
Version: 0.1
License: LGPL
Modules: Foo
Exposed-Modules: Foo
Extensions: ForeignFunctionInterface
C-Sources: c_src/foo.c

Build creates c_src/foo.o => dist/build/foo.o (from the 
C-Sources build instruction in Distribution.Simple.Build).
In the later stage it tries to look for the object file
in dist/build/c_src/foo.o which fails.

A complete minimal example is at

- Einar Karttunen

More information about the Libraries mailing list