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

Olivier Boudry olivier.boudry at gmail.com
Thu Jul 17 02:10:17 EDT 2008

On Wed, Jul 16, 2008 at 6:22 PM, PJ Durai <pjdtech2000 at gmail.com> wrote:
> 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.

Is your import library a ".lib" or a ".a" file? If you have a ".lib"
import library ghc will ignore it and link directly with the DLL.

I think you can convert a ".lib" to a ".a" using the reimp tool which
is part of the mingw utilities.

More information about the Haskell-Cafe mailing list