
On Sun, Apr 22, 2007 at 05:31:31PM +1000, Duncan Coutts wrote:
On Sun, 2007-04-22 at 00:11 +0100, Frederik Eaton wrote:
Hello,
I am trying to get cabal to link an object file with a library.
Do you mean you want to link to an existing C library? You don't need ld-options for that of course, just extra-libraries (and maybe extra-lib-dirs).
No, I have an object file which I have compiled with g++, and a Haskell library which uses symbols from it. I usually just put it on the ghc command line and that seems to work, but don't know what the Cabal equivalent of this technique is.
I tried naming it in an ld-options: line, but it didn't show up in the arguments to 'ld'. Is this the correct behaviour?
For a bug report like this it's much more helpful if you give more detail on exactly what you did, exactly what happened and what you were expecting. In this case for example you could include the output of runghc Setup.hs build -v so you and we could see exactly how cabal is calling ghc/ld/whatever.
The ld-options are passed to ghc when it links an executable and they also get included in library package registration information.
OK, I've attached my cabal file and a transcript of the verbose output. $ grep string vectro.cabal ld-options: this string never appears anywhere as far as i can tell $ grep string cabal.out [1]$ Thanks, Frederik -- http://ofb.net/~frederik/