[Haskell-cafe] Linker problems linking FFI import call in Windows

PJ Durai pjdtech2000 at gmail.com
Wed Jul 16 12:22:46 EDT 2008

On 7/16/08, Olivier Boudry <olivier.boudry at gmail.com> wrote:
> On Tue, Jul 15, 2008 at 11:51 PM, PJ Durai <pjdtech2000 at gmail.com> 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.

More information about the Haskell-Cafe mailing list