[Haskell-cafe] how to link statically with a c lib ?

minh thu noteed at gmail.com
Sun Feb 8 07:50:42 EST 2009


Hi,

I'm writing bindings for the Tiny C Compiler.
It seems that tcc provide a libtcc.a but no libtcc.so.

In my cabal file, I have

  extra-libraries:     dl, tcc

but when using the generated haskell module,
I have the following message :

  ⟨thu at jones samples⟩ ghc -e "main" Test.hs
  <interactive>: <command line>: can't load .so/.DLL for: tcc
(libtcc.so: cannot open shared object file: No such file or directory)

How can I generate a module linked statically against libtcc ?

Thanks,
Thu


More information about the Haskell-Cafe mailing list