RE: Re: Static libcurl size under Windows
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 makefilebuild.vc 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 MakefileBuild.vc. 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 Makefile.vc 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.
- application/octet-stream attachment: Makefile.vc
- application/octet-stream attachment: Makefile.vc.org
- application/octet-stream attachment: MakefileBuild.vc
- application/octet-stream attachment: MakefileBuild.vc.org