
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 wrote:
I tried that - there was no output. Note that in dlltool --help it says that -D is for *input* DLL file.
I did this multiple times with success :) I think there is something wrong with your .def file, perhaps.
Yes that makes sense. My .def file has only this: EXPORTS symbol1 symbol2 … What does a correct .def file look like?
These are mangled Visual C++ names, you can't use them at all and you don't need them at all, you should simply remove all of them from your .def file.
OK I did that. Now I was able to use dlltool to create new .lib files from the original DLLs. And I was able to compile my test program against the new .lib files. But it still segfaults when I try to run it with the original DLLs.
I successfully used several Windows 64 Visual C++- generated DLLs through FFI. Usually there are no problems with them if your generate import libraries as described above.
That is great! Can you get a successful build of my simple test code: https://github.com/ygale/test-text-icu and give a list of exactly what commands you entered to get it to build? (Check that the compiled executable runs without segfault.) That would be very helpful. Thanks, Yitz