AW: Using GHC and FFI
Nick Main
nickmain at earthlink.net
Fri Jul 16 20:49:50 EDT 2004
You should compile the .c file using GHC itself. This guarantees that,
under the hood, you are using the right version of gcc.
I've never been able to get MS VC++ to work for compiling statically
linked C source - but it works great for building DLLs that you can then
reference from the Haskell .exe .
Dominik Oesterreich wrote:
>>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.
>
>
>Well, I certainly red the GHC Documentation and so I tried all that
>things. Fortunately doest it work now.
>First I compiled the *.c file with Microsoft C++ 6.0 an took the
>projekt.obj file, but it doesn't work. After that I tried gcc, which
>created the projekt.o File and I got no errors.
>
>
>Dominik
>
>_______________________________________________
>Glasgow-haskell-users mailing list
>Glasgow-haskell-users at haskell.org
>http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
>
>
More information about the Glasgow-haskell-users
mailing list