[Haskell-cafe] Why doesn't text-icu work on 64 bit Windows?
kyrab at mail.ru
Tue Dec 9 20:06:02 UTC 2014
On 09-Dec-14 20:18, Yitzchak Gale wrote:
> Hmm, that would be a pretty complex task, but maybe I'll try it.
> The question is - if this is the problem, then why do the DLLs
> generated by Visual Studio work for 32 bits but not 64 bits?
I don't know why but this is so.
> I found instructions how to do it here:
> Create a .def file with this format:
> where Foo and Bar are the symbols to be exported by the DLL.
> Then run these commands:
> gcc -mdll -o junk.tmp -Wl,--base-file,base.tmp bar.o
> del junk.tmp
> dlltool --dllname bar.dll --base-file base.tmp --output-exp temp.exp
> --def bar.def
> del base.tmp
> gcc -mdll -o bar.dll bar.o -Wl,temp.exp
> del temp.exp
> The first few steps use the .def file to create an .exp file.
> ICU provides the Visual Studio 2010 .exp files, so I tried
> just using those. It didn't work. So in order to figure out what
> symbols to export for each DLL, It looks like I'll need to open
> the ICU4C projects in Visual Studio 2010.
> Is this really what you need to go through to compile a basic
> library from Hackage on 64 bit Windows?
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>'.
The problem is how to obtain .def file from existing dll. There exists
'pexports' utility generating .def file from given dll, but I'm not sure
it exists for 64-bit case.
There are 2 possibilities though:
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.
2. Try to link to DLLs *directly* -- using binutils' facility to link
against DLL directly instead of it's import lib.
More information about the Haskell-Cafe