impdef, msvc++ 6, and GMP
kalinabears at iinet.net.au
Fri Nov 7 12:20:38 CET 2003
Kevin Ryde wrote:
> Actually, I think .libs/libgmp.dll.a is the import library, but in
> "ar" format. That won't work with msvc will it?
It won't work. (Questions in the negative really throw me. I never know
whether to answer with a 'yes' or a 'no' :-)
> Is there a way to convert to .lib?
I couldn't find one.
>>But did Kevin say that there would be no def file created in future
>>builds of GMP ?
> Yes, the next libtool doesn't create it any more, since newer binutils
> can go directly to libgmp.dll.a.
> dlltool can create it though, I think with
> dlltool .libs/libgmp-3.dll --export-all-symbols -z foo.def
> Though maybe that gives a few more symbols than it should (some of the
> libc stuff). Maybe that -z needs to be worked into the ld invocation
> which creates libgmp-3.dll in the first place.
I don't use dlltool, but I gave your suggestion a run. The command (as
you've given above) produces a def file, without error or warning, but
about 10% larger than the one produced by building 4.1.2 with gcc.
Using 'foo.def' to create the lib file (with the 'lib' command), in turn
creates a lib file about 10% larger - again without error or warning. I
haven't tested that lib file for functionality ... it's a little messy
for me to do that, so I thought I'd wait and see what others come up
with .... maybe they can save me the trouble, but I *can* test it if
> But in any case perhaps we can recommend dlltool to create the .def,
> and lib to create the import library (the way the 4.1.2 manual says).
It's just so much nicer and easier if people can simply take the dll and
build the lib using only msvc++, without having to use any other tool.
Of course, they already can do that ... if they've got a 'proper'
edition of msvc++ 6 :-)
Any emails containing attachments will be deleted from my ISP's mail
server before I even get to see them. If you wish to email me an
attachment, please provide advance warning so that I can make the
More information about the gmp-discuss