Hello John,

Saturday, November 26, 2005, 5:59:41 AM, you wrote:

JZ> I want to compile a Haskell program that calls a foreign C function.  I'm
JZ> using GHC.  When GHC links, it says it can't find my C function.  That is 
JZ> not surprising, because I can't figure out how I'm supposed to tell GHC 
JZ> where to find my C function.

in order to link in C module you should compile it separatelly (better
by ghc itself - it will setup all needed options and then call gcc)
and add its .o module to the cmdline: 

ghc -c myc.c
ghc --make ffi.hs myc.o

also try the following:

ghc --make ffi.hs myc.c

may be it will also work

-- 
Best regards,
 Bulat                            mailto:[EMAIL PROTECTED]



_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to