DLL to lib*.a?

Colin Peters colin@bird.fu.is.saga-u.ac.jp
Wed Apr 2 18:49:00 GMT 1997


kunglao@prairienet.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@bird.fu.is.saga-u.ac.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@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list