Closed jbfsoftware closed 4 years ago
@jbfsoftware:
curl.exe
is statically linked, so no other DLL is needed for it. This is the main objective of the distribution, as the most common use-case, and the download page refers to this one.libcurl.dll
, which does indeed require some of its dependencies in DLL form (also distributed), as you noted. As I'm not a user of this variant, this was least in focus and rather just a nice to have by-product of the build process.These are the combinations covered in curl-for-win
.
If anything, the third variant could likely be improved by relying on DLLs for all of its dependencies, but it would also require building e.g. nghttp2
in DLL form (it currently isn't), and/or tweaking the rest of the libcurl build to link the DLL variant where available. I'm open to PRs for that.
Another option is to build a full-static libcurl.dll
, though I'm not certain how this behaves in apps having other libs linked that also require e.g. OpenSSL. It would also make libcurl.dll
(and thus the curl.exe
download archive) much larger without benefit for most users.
UPDATED: to cover the fact that some dependencies are statically linked to
libcurl.dll
.
Hi. Thanks for the swift reply. OK. It makes sense that your primary target is/was curl, not libcurl. I only use libcurl so I had a different focus on it. Am I correct to say that libcurl needs the openssl dlls and the zstd libraries, but that the nghttp2 and libssh2 dlls are statically built in this distribution?
@jbfsoftware Yes, you're correct. [UPDATE: brotli
is also part of libcurl.dll
.]
Here's the relevant line from the build log, which lists all DLL dependencies of the freshly built libcurl.dll
: https://ci.appveyor.com/project/curlorg/curl-for-win/build/1.0.1400/job/y243ie2mfucfkr5o#L11231
I'm preparing patches to link zstd
statically to libcurl.dll
.
As for nghttp2
, it not only requires building the lib itself as DLL, but needs to compile curl in a second round without the -DNGHTTP2_STATICLIB
option.
Build 7.72.0_2 is out, with zstd
linked statically to libcurl.dll
.
Ref: https://github.com/curl/curl-for-win/commit/d9b266afd2e5d3f5604483010ef62340b5918c89
@vszakats Thanks very much. I think this is a very welcome improvement and it works like a charm. I'm very happy with it and I appreciate your very swift actions. I will close the issue. You did more than I hoped for.
https://curl.haxx.se/windows/ says cUrl was statically linked to a bunch of libraries. However if I try to use libcurl I still need the OpenSLL and the Zstd libraries. Isn't it so that cUrl was statically linked to the other libraries but (only) dynamically to these two? If so maybe make the download page more accurate to avoid confusion.