
On 7/16/08, Olivier Boudry
On Tue, Jul 15, 2008 at 11:51 PM, PJ Durai
wrote: I am trying to import some functions from a windows DLL. I am getting strange errors. (This used to work with previous versions of GHC. 6.6 I think.).
You may have to create an import library for the DLL. I had a similar problem and solved it that way.
Look at http://www.emmestech.com/moron_guides/moron1.html for advices on how to create such a library.
My problem was that the exports in the dll were prefixed with an underscore. I had to remove them from the .def file before creating the import library.
I do have the import library. It came with the DLL. It links properly when I use CCALL on the haskell import statements. Doesnt link when I use STDCALL. It looks for function name with something like '@4 or @8' tacked on at the end. Not sure what that is all about.