delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/04/02/23:36:40

From: colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp (Colin Peters)
Subject: RE: DLL to lib*.a?
2 Apr 1997 23:36:40 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <01BC4024.F5AA24A0.cygnus.gnu-win32@gbird0>
Mime-Version: 1.0
Original-To: "'GNU-Win32'" <gnu-win32 AT cygnus DOT com>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

kunglao AT prairienet DOT org wrote:
>> 
>>      Has this made it to the FAQ yet?  Try the following:
>>      
>>      dlltool --dllname ouch.dll --output-lib libouch.a
>>      
>>      Replace "ouch" with the DLL's base name for both ouch.dll and 
>>      libouch.a.
>>      
>>      Dave
>
>Tried that.  It made a very small lib (1514 bytes).  I have read 
>about needing a .def and/or export file.  But nothing about how to 
>make them, either :).

As I mentioned before that command doesn't actually look at the DLL,
but just builds a skeletal library with no exported functions.

In another mail I mentioned you can use nm to get a look at function
names in a DLL (if it has symbols in it, many do not) or the Win95
Quick View option (if you enabled Quick View when installing Win95, or
added it on later, then you can right click on a DLL, quick view it,
and get a dump including a list of exports).

Another option I have personally is a program called pedump. This
came from the lcc free C compiler package
(http://www.remcomp.com/lcc-win32/) and outputs a long dump of
information including a list of exports. Apparently it was written
originally by Matt Pietreck, so I might try searching for him to
find the source.

With any of these options you then go and write a .def file (one
line "EXPORTS" followed by function names one per line) to use with
dlltool to get a real import library.

Colin.

-- Colin Peters - colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp
-- Saga University Dept. of Information Science
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/

-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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