Creating a library from a dll

DJ Delorie dj@delorie.com
Thu Dec 10 14:53:00 GMT 1998


Triple-T wrote:
> Say I have a dll that I want to use with my program but I don't have a
> library for it so I can't use just do a

<plug>Get the new improved linker!  The latest version of ld (may be in B20.1, is
in gas snapshots) allows you to list the .dll right on the link line!  The
linker generates the import library internally, and fixes up problems with
missing @nn's.</plug>

If you have the new linker, "ld --help" will list all the i386-specific
options, including (for example) --output-def.

> nm whatever.lib > whatever.NM
> cat whatever.nm | egrep '^........ [T]' | sed 's/[^_]*_//' ...

That "nm" would be done to the .dll, not the .lib

> so, what are my choices here ? I found an impdef utility but it only
> generates the def like this .
> 
> EXPORTS
> functioname
> function2
> function3

This format will work with the new linker, as it fixes up these references
on the fly.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list