Windows ld bug/RFE with MSVC .libs
Greg Couch
gregc@cgl.ucsf.EDU
Mon Sep 9 18:02:00 GMT 2002
The MinGW folks said to bug you guys at binutils, so here goes :-).
ld on Windows will successfully find exported functions in a Microsoft
Visual C++, MSVC, generated .lib to link against, but not exported
"DATA". So ld is unable to link to third-party libraries generated by
MSVC. I consider this behavior a bug as there is no workaround
possible with the utilities provided (please let me know if I'm wrong).
Either ld should not link against .lib's at all and a utility should
be provided to generate a .a from a .lib or ld should link against
all of the .lib.
For the record, I found a workaround, pexports -- a GPL'd program that
reads a .dll and generates a .def file (that dlltool can convert to
a .a) -- <http://starship.python.net/crew/kernr/mingw32/pexports-0.42h.zip>.
Please encorporate its magic into ld/nm. (And it would be even better if
-lname would look for name.lib in addition to libname.a.)
Thanks for your attention,
Greg Couch
UCSF Computer Graphics Lab
gregc@cgl.ucsf.edu
More information about the Binutils
mailing list