This is the mail archive of the
mailing list for the Cygwin project.
Re: Find dll name corresponding to an import library
- From: Warren Young <warren at etr-usa dot com>
- To: Cygwin-L <cygwin at cygwin dot com>
- Date: Wed, 06 Nov 2013 18:46:49 -0700
- Subject: Re: Find dll name corresponding to an import library
- Authentication-results: sourceware.org; auth=none
- References: <l5eg01$5qf$2 at ger dot gmane dot org>
On 11/6/2013 15:31, Jean-Pierre Flori wrote:
Is there a canonical way to do so?
The canonical way is to name your import libraries so that the name of
the corresponding DLL is obvious.
Non-Cygwin import libraries are traditionally named after the DLL:
foo.lib is for foo.dll.
Cygwin's stock build system is a bit different, due to POSIX naming
norms, but the transform is simple: libfoo.a is for cygfoo.dll.
If you have an import library with a name that doesn't conform to one of
these schemes, you might be able to dig the DLL name out of the library
file. Through some futzing around, I've discovered that this works:
$ objdump -s foo.a | grep cyg.*dll$
That assumes that the DLL uses the "cyg" prefix. Just grepping for
"dll$" would be a better option if you weren't sure about even that.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple