Using Cabal for a simple wrapper library

Isaac Jones ijones at
Wed Oct 6 19:07:49 EDT 2004

Einar Karttunen <ekarttun at> writes:

> Hello
> I am trying to use Cabal for a small library that essentially just
> wraps a C library. There seems to be no (documented) way of linking 
> the produced library with an external library.

To be clear, extra-libs isn't what you want?

If not, you have two choices:

1) add this feature to cabal and send me the patch (preferably with a
   simple "darcs record" and "darcs send")

2) the basic strategy for doing something that _almost_ fits the
   pattern of the "Distribution.Simple" infrastructure is to copy
   Distribution.Simple, and add what you need, in this case, probably
   to the BuildCmd line :) that way, it conforms to the command-line
   interface and you don't have to do any extra work.

> Extensions: ForeignFunctionInterface
> -- -fglasgow-exts is needed for data without a constructor
> -- -#include is a hack
> -- -cpp needs a better way of saying it

I hope to have a coherent preprocessing system in the near future.



More information about the Libraries mailing list