delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/13/18:27:42

X-Spam-Check-By: sourceware.org
Message-ID: <43C83765.DE0E1EFE@dessent.net>
Date: Fri, 13 Jan 2006 15:27:33 -0800
From: Brian Dessent <brian AT dessent DOT net>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: How to convert from windows DLL to windows lib file?
References: <33017926 DOT 1137194032208 DOT JavaMail DOT SYSTEM AT CCC-NOVA1>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


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