[Haskell-cafe] Why doesn't text-icu work on 64 bit Windows?

Yitzchak Gale gale at sefer.org
Wed Dec 10 12:56:20 UTC 2014

I wrote:
>> I found instructions how to do it here:
>> http://www.willus.com/mingw/colinp/win32/dll/make.html

Kyra wrote:
> No, no. If you have existing .def file the single thing to do is 'dlltool -l
> <import library name> -D <dll file name> -d <.def filename>'.

I tried that - there was no output.
Note that in dlltool --help it says that -D is for *input* DLL file.

> The problem is how to obtain .def file from existing dll…
> 1. Use Microsoft 'dumpbin' utility, which gives a list of exported symbols
> when run with '/EXPORTS' flag. The utility should be available from VS
> community edition at least.

I have full VS 10, so I have dumpbin. But the exports list it
creates has many C++ mangled symbols, like:

??0?$EnumSet at W4UDateFormatBooleanAttribute@@$0A@$03 at icu_54@@QEAA at AEBV01@@Z

When I try to create a .exp using dlltool with a .def containing
junk like that, it fails:

dqsfc.s: Assembler messages:
dqsfc.s:4102: Error: bad expression
dqsfc.s:4102: Fatal error: rva without symbol
dlltool: as exited with status 1

> 2. Try to link to DLLs *directly* -- using binutils' facility to link
> against DLL directly instead of it's import lib.

That would be much better. If we can get that to work,
we can teach cabal how to do it too. Then FFI will work
again on Windows 64 bits. The problem is that binutils
does not understand DLLs from VS on 64 bits, it seems.


More information about the Haskell-Cafe mailing list