On 09/01/2012 12:13 AM, Farid Neshat wrote:
So I'm trying to follow [this blog][1]. So I tried the code, couldn't
compile the haskell part, probably due to the fact the guide uses
version 6, but I have version 7 of ghc. By changing the paramaters I
could compile it with the following:

ghc --make -dynamic -shared -fPIC -no-hs-main -optl '-shared' -optc
'-DMODULE=Test' -o Test.so Test.hs module_init.c

You need to link against the haskell runtime:

ghc --make -dynamic -shared -fPIC -no-hs-main -o X.so -optl-Wl,-rpath,/usr/lib/ghc/ -lHSrts_debug-ghc7.4.1

Cheers,
M


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to