curl / Mailing Lists / curl-library / Single Mail


RE: Re[6]: Static libcurl size under Windows

From: Kees Dekker via curl-library <>
Date: Mon, 24 Apr 2017 09:41:21 +0000


>I need static libcurl.lib which uses static OpenSSL but does NOT contain it as
>part of itself. Otherwise I would get link errors (symbol conflicts) when
>building VirtualBox with both libcurl AND openssl. The first scenario gave me
>exactly what I needed, but now in 7.54.0 it is deprecated. How do I get that
>type of libcurl.lib now?

If I remember well (it is some time ago that I have built curl 7.53.1 with openSSL 1.1.0e, using Visual Studio 2015, all static libs), the lib command in the was not correct. There was a discussion with other people about the Windows build, but unfortunately I did not have time to make a git pull request. You may benefit from attached make files (the .org files are the original ones). Use it at your own risk. Store in the winbuild directory. The change that is important to you is in See the changed lib command/MakefileBuild:375-381.

My (64-bit release) build is called by using the following command (drive letters and path names are off course system/user dependent):

nmake -f mode=static VC=14 WITH_SSL=static WITH_ZLIB=static WITH_SSH2=static GEN_PDB=yes DEBUG=no MACHINE=x86 SSL_CFLAGS="/IX:\common\thirdparty\OpenSSL\build\Windows\Win32\include" ZLIB_CFLAGS="/IX:\common\thirdparty\zlib\build\Windows\include" SSH2_CFLAGS="/IX:\common\thirdparty\libssh2\build\Windows\include" SSL_LIBS="libcrypto.lib libssl.lib" ZLIB_LIBS=zlib.lib SSH2_LIBS=libssh2.lib DEVEL_LFLAGS="/LIBPATH:X:\common\thirdparty\OpenSSL\build\Windows\Win32\lib /LIBPATH:X:\common\thirdparty\zlib\build\Windows\Win32\lib /LIBPATH:X:\common\thirdparty\libssh2\build\Windows\Win32\lib"

I know that I used a quick & dirty workaround. Just check the diffs between the org and non-org file to see what I changed.



Received on 2017-04-24