problems with the ffi

Simon Marlow
Mon, 11 Nov 2002 10:02:44 -0000

> I am having problems with the ghc ffi, I have compiled the=20
> Haskell source on the ffi example page to create the stub=20
> file and the c file, the only problem now is that I can't=20
> compile the sample c code. I assume that if you place the c=20
> code and all the files in the ghc include directory that it=20
> should compile. However I am getting errors, to begin I get=20
> something like can't find stint.h when it is definitely=20
> present. Then I get errors with the special Haskell ffi=20
> procedures i.e. startupHaskell(argc, argv, __stginit_Foo).=20
> The compiler says that this is an unresolved external symbol.
> =20
> I am attempting this on windows xp using visual c++ 5. Any=20
> help would be greatly appreciated.

It would help if you could post the exact procedure you're using, and
the error messages you get (just cut 'n' paste it). =20