This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to convert from windows DLL to windows lib file?


Siegfried Heintze wrote:

> Is there a way to generate a windows LIB file from windows DLL file? I
> thought I saw it somewhere in some documentation but I cannot remember
> where.
> 
> I think it is one of the bin utils.  Since someone recently explained that
> cygwin so files are the same as dll files, can I infer that the same
> technique works for converting so files to LIB files?

I think here you are referring to an *import* library, or what dlltool
seems to call and *interface* library.  You certainly can't create a
static library from an existing dynamic libray, but you can create an
import library from a dynamic library.  Check the documentation of
dlltool, which can create the .lib file from a .def file.  Or just use
-Wl,--out-implib when building the DLL and you will get an import
library (.a) for it, which you can just rename to .lib.  If all you have
is the dll you can use 'pexports' to create a .def file and then dlltool
to create the import library.  You may even be able to do this in one
step with dlltool, I'm not sure.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]