Using GHC and FFI
dominik at oesterreichnet.de
Thu Jul 15 14:15:27 EDT 2004
I try to use the FFI, but it doesn't work.
int test (void)
and compiled this. So I created a file named project.obj.
Then I wrote a Lhs File named test.lhs
>module Blah where
>foreign import ccall test :: CInt
>blah = test
After that I wrote ghc -fffi -c test.lhs. But when I call blah from ghci
I get the error message: "test.o unknown symbol '_test'
I think ghc doen't link test.o to projekt.obj. What do I have to do?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Glasgow-haskell-users