Web lists-archives.com

Re: [Mingw-users] Problems creating linkable file from MSVC .lib

On 20/02/16 08:40, Eli Zaretskii wrote:
>> From: John Brown <johnbrown105@xxxxxxxxxxx>
>> Date: Sat, 20 Feb 2016 01:26:55 +0000
>> Also, I am just noticing that you call the import library libvcand32.a.
>> It should be called libvcand32.dll.a. The static library (if you had one)
>> would be called libvcand32.a. I don't know whether it matters or not,
> It doesn't matter ...

To be strictly accurate, we need to add a proviso: it doesn't matter,
provided there is no static linking alternative to use of the DLL; i.e.
when the application will link dynamically to foo.dll, and there is no
possibility that -lfoo might refer to a static libfoo.a, then an import
library for foo.dll may be called either libfoo.dll.a or libfoo.a, and
-lfoo will "just work", for dynamic linking.

The situation is entirely different, in the case where libbar.a is a
static library alternative to bar.dll; in this case, an import library
for bar.dll must be called libbar.dll.a; by default, -lbar will resolve
as libbar.dll.a, unless the linker's -Bstatic option is in effect, at
the time when -lbar is processed, so selecting the static libbar.a.

> (though I agree it's better to stick to .dll.a).

I agree too; it's unambiguous, and potentially less confusing for us humans.

> E.g., all the import libraries provided with MinGW w32api package are
> *.a files, and GCC uses them with no problems.

That is an historical artefact, from the days before the conventions for
handling of libfoo.a vs. libfoo.dll.a were well established.  There may
be an argument for renaming them, in a future release, but it has always
been dismissed as "hardly worth the effort".


Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F

Attachment: signature.asc
Description: OpenPGP digital signature

Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe