Using Cabal for a simple wrapper library

Einar Karttunen ekarttun at
Wed Oct 6 14:48:18 EDT 2004


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.

Basically I have and libfoo.a, and would need the cabalized
package to link to either of them. I am trying to use Distribution.Simple 
and my Setup.description looks like:

Name: qdbm
Version: 0.1
License: LGPL
Copyright: (c) Einar Karttunen 2004
Stability: alpha
Build-Depends: haskell-src
Modules: Database.QDBM.Depot
Maintainer: Einar Karttunen <ekarttun at>
Extra-Libs: qdbm
Extensions: ForeignFunctionInterface
-- -fglasgow-exts is needed for data without a constructor
-- -#include is a hack
-- -cpp needs a better way of saying it
-- And how should the library be linked really?
Options-ghc: -cpp -fglasgow-exts -O2 -#include <depot.h> 

- Einar Karttunen

More information about the Libraries mailing list