delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/12/10/11:45:07

From: DJ Delorie <dj AT delorie DOT com>
Subject: Re: Creating a library from a dll
10 Dec 1998 11:45:07 -0500 :
Message-ID: <366FFA93.59A4C690@delorie.com>
References: <366B51E5 DOT 53DB9026 AT pobox DOT com> <366F4F43 DOT C6D9EDD4 DOT cygnus DOT gnu-win32 AT usa DOT net>
Mime-Version: 1.0
X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.1.126 i586)
X-Accept-Language: en

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019