GHC 6.4.1 and Win32 DLLs: Bug in shutdownHaskell?

Cyril Schmidt cschmidt at
Fri Mar 3 07:27:51 EST 2006


> - How to generate an import library at all?
Check this out:

> - Assuming I have obtained an import library, how to use in the
> Microsoft world, i.e.
> how to bridge the gap from .a to .lib?
See above.

> - Is Visual Studio 7 able to process the header files included from the
> stub header files generated by ghc? Visual Studio 6 has a lot of
> problems, e.g. it knows nothing about the type long long.
I could not make Visual Studio 7 understand those, but I didn't try really

> - Didn't you have problems with mangled names?
Haskell would not understand mangled names.
You have to declare the Haskell functions
as extern "C" in the C++ code.

This, of course, does not count for functions that are passed to/from
Haskell via a function pointer.

> - What is the principal difference between using the import library and
> writing one on my own? Does the import library do anything else than
> loading the library and delegating the calls?
I don't know :(

Just one more piece of advice: if you can compile your C++ code with gcc,
you probably can link it statically to the Haskell code, thus avoiding this
DLL nightmare.

Hope this helps.



More information about the Glasgow-haskell-users mailing list