curl / Mailing Lists / curl-library / Single Mail

curl-library

Static libcurl size under Windows

From: Konstantin Vlasov <flint_at_flint-inc.ru>
Date: Wed, 19 Apr 2017 21:38:45 +0300

Hi,

For building VirtualBox I'm using static libcurl version built from sources
using MS Visual C++ 2010 (10.0).

In the past I was building only libcurl.lib by entering the lib/ directory and
running:

nmake /f Makefile.vc10 cfg=release-ssl

It produced the libcurl.lib of about 1 Mb which I then used for linking
VirtualBox files.

Today I upgraded to curl-7.54.0 and discovered that there are no longer
Makefile.vc files in the lib directory, that you have to go to winbuild and work
there. OK, I did this, read about the new options and started build like that:

nmake /f Makefile.vc mode=static WITH_SSL=static DEBUG=no MACHINE=x86 WITH_DEVEL=C:\Programs\OpenSSL\x32 ENABLE_SSPI=no ENABLE_WINSSL=no

It produced libcurl_a.lib with size of 21 Mb! I tried the same with 7.52.1 (the
last version with lib/Makefile.vc* so that I could compare), and it produced the
same huge file, so it's not the difference between 7.52.1/7.54.0, but some
difference in build procedures.

So, my questions are:
1. Why are the resultant files so hugely different?
2. Will it affect the final executable size? Theoretically, if the difference is
caused by presence of some unused functions they will be discarded when linking,
but I don't know if they are really unused.
3. Is there no longer an option to build just the library without curl.exe? (Of
course I can just delete it but why waste time for building something I don't
need?)

-- 
Bye.                                    With best regards,
                                        Konstantin Vlasov.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-04-19