cURL / Mailing Lists / curl-library / Single Mail


Re: Are libcurldll.a and libssh2dll.a meant to be named as such?

From: K. Frank <>
Date: Fri, 16 Aug 2013 23:17:32 -0400

Hi GŁnter!

Thanks for the follow-up.

On Fri, Aug 16, 2013 at 9:26 PM, Guenter <> wrote:
> Hi,
> On 14.08.2013 15:06, K. Frank wrote:
>> I downloaded the 64-bit mingw-w64 version of libcurl:
>> ...
>> In its lib64 directory I find
>> libcurldll.a
>> libssh2dll.a
>> I might have expected them to be named
>> libcurl.dll.a
>> libssh2.dll.a
>> with an additional dot ('.') preceding the "dll."
>> This would have been consistent with the naming of the other
>> libraries, e.g., libcrypto.dll.a, and seemingly more consistent
>> with the naming of the .a and .def files.
> true, but ...
>> It's hardly a big deal -- in my compile command I specify
>> "-lcurldll" rather than "-lcurl", and everything works. But
>> I'm wondering if this choice of naming was intentional, and
>> if so, what the reasoning is.
> its exactly that: you can easily decide to link either statically or
> dynamically; if you have both a libcurl.a and libcurl.dll.a in the same
> directory the linker will always prefer to link against the *.dll.a; if you
> specify -static then that counts for *all* libs; you cant f.e. link one
> library statically and another dynamically unless you remove the dynamic
> link libraries for those libs you want to link statically ...

I like your reasoning. I don't really know the history and reasoning behind
the typical mingw library naming system, and hadn't realized that it limits
one's flexibility in choosing which libraries to link statically vs.

> if I have a lot of time (very unlikely ATM) then I might dig into the MinGW
> makefiles, and modify them to use -l only for dynamic linkage and for static
> linkage only add the static lib with full path - that should work ...

Just to be clear, I'm not complaining or asking for any change -- the current
system works just fine for me. I was just curious about the apparent

Also, do I surmise correctly that the naming convention for libcurl differs
from that of, say, libcrypto because libcrypto is a separate project that
you just use, and you don't elect to force your preferred naming convention
on them?

Again, just curious. I don't have any preference about whether things are
done one way or the other.

> GŁn.

Thanks for your explanation.

K. Frank

List admin:
Received on 2013-08-17