Hugs FFI : HugsAPIx in GreenCard.h and output .c files
-------------------------------------
Environments:
[Platform] Windows 98
[Haskell Interpreter] Hugs98 (February 2001; Windows Installer)
[C Compiler] lcc-win32 (Version 3.1)
-------------------------------------
Trying to use FFI on Hugs98, I prepared two files;
`_test.c' and `test.hs'.
--------------------------------------
[_test.c]
#include
Because the header file `GreenCard.h', I got from Green Card 2.01, declared not HugsAPI3 but HugsAPI2, I compiled two .c files into `Test.dll' AFTER REPLACING `HugsAPI3' INTO `HugsAPI2'. Then I load `Test.hs' again.
hugs Test.hs
But I got such an error:
Unable to load GreenCard primitives
Because of the difference of the versions of headers? Provided that, where could I get the appropriate version of the GreenCard header file?
You should use the copy of GreenCard.h that comes with the source distribution of Hugs. (Actually, the binary distribution should be modified to include GreenCard.h. We might also consider renaming the file HugsFFI.h or some such.) I'm not sure if this will solve your problems but it will certainly eliminate one possible source. Alastair ps As far as I am aware, you are the first person to use the FFI with Windows. Good luck!
participants (2)
-
Alastair Reid -
Kakihara Norihiro