Using GHC and FFI

Wolfgang Thaller wolfgang.thaller at
Fri Jul 16 04:15:37 EDT 2004

> and compiled this. So I created a file named project.obj.

We normally use .o rather than .obj; I don't know if using .obj can 
cause any problems with ghc.

> 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?

Start GHCi with the following command line:

ghci -fffi test.lhs project.o

GHCi should just load the object file, and you shouldn't have a problem.



More information about the Glasgow-haskell-users mailing list