linking with c++ libraries

Corneliu Popeea corneliu@comp.nus.edu.sg
Sat, 21 Jul 2001 01:32:43 +0800


I'm trying to use from Haskell a C++ library (Omega Calculator).
I'm using the following command:

ghc -c -fglasgow-exts -package lang main.hs
ghc main.o mylib.o -lomega -lstdc++ -fglasgow-exts -package lang

Do I need to add more options? The compilation went fine (after I added 
-lstdc++ which is invoked by default by "g++", but not by "ghc"), but the 
executable generates a core.
Omega library used from a C++ file, with the same call, and same parameters 
runs ok.

Best regards,
Corneliu