I tried the following approaches and none of them worked. (The OpenSSL and Zlib libraries are located under \Prebiuilt\[Debug | Release] ) Set the ZLIB_LIBS environment variable SET ZLIB_LIBS=zlibwapi.lib
NMAKE /E /F Makefile.vc VC=14 WITH_SSL=dll WITH_ZLIB=dll ENABLE_IPV6=yes GEN_PDB=yes MODE=dll MACHINE=x86 WITH_DEVEL=D:\Prebuilt\Debug DEBUG=yes 2. Define ZLIB_LIBS directly in the command line NMAKE ZLIB_LIBS=zlibwapi.lib /F Makefile.vc VC=14 WITH_SSL=dll WITH_ZLIB=dll ENABLE_IPV6=yes GEN_PDB=yes MODE=dll MACHINE=x86 WITH_DEVEL=D:\Prebuilt\Debug DEBUG=yes I got the following errors in both cases: LINK : fatal error LNK1181: cannot open input file 'zlib.lib' NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe"' : return code '0x49d' I finally gave up and changed ZLIB_LIBS macro in MakefileBuild.vc directly. It compiled fine but I got a different error: …. Copyright (C) Microsoft Corporation. All rights reserved. Using SSL: true Using NGHTTP2: false Using c-ares: Using SSH2: Using ZLIB: true Using IDN: true Using IPv6: true Using SSPI: true Using WinSSL: false CFLAGS: /I. /I ../lib /I../include /nologo /W4 /wd4127 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /ID:\Prebuilt\Debug/include /DUSE_OPENSSL /ID:\Prebuilt\Debug/include/openssl /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES /DUSE_IPV6 /DUSE_WINDOWS_SSPI /Zi /Fd..\builds\libcurl-vc14-x86-debug-dll-ssl-dll-zlib-dll-ipv6-sspi-obj-lib\libcurl_debug.pdb LFLAGS: /nologo /machine:x86 /LIBPATH:D:\Prebuilt\Debug/lib libeay32.lib ssleay32.lib zlibwapi.lib /incremental:no /opt:ref,icf GenPDB: true Debug: yes Machine: x86 link.exe /DLL ws2_32.lib wldap32.lib advapi32.lib Normaliz.lib /out:..\builds\libcurl-vc14-x86-debug-dll-ssl-dll-zlib-dll-ipv6-sspi-obj-lib\libcurl_debug.dll /DEBUG /IMPLIB:..\builds\libcurl-vc14-x86-debug-dll-ssl-dll-zlib-dll-ipv6-sspi-obj-lib\libcurl_debug.lib /nologo /machine:x86 "/LIBPATH:D:\Prebuilt\Debug/lib" libeay32.lib ssleay32.lib zlibwapi.lib /incremental:no ….. Creating library ..\builds\libcurl-vc14-x86-debug-dll-ssl-dll-zlib-dll-ipv6-sspi-obj-lib\libcurl_debug.lib and object ..\builds\libcurl-vc14-x86-debug-dll-ssl-dll-zlib-dll-ipv6-sspi-obj-lib\libcurl_debug.exp version.obj : error LNK2019: unresolved external symbol _zlibVersion referenced in function _curl_version content_encoding.obj : error LNK2001: unresolved external symbol _zlibVersion content_encoding.obj : error LNK2019: unresolved external symbol _inflate referenced in function _inflate_stream content_encoding.obj : error LNK2019: unresolved external symbol _inflateEnd referenced in function _exit_zlib content_encoding.obj : error LNK2019: unresolved external symbol _inflateInit_ referenced in function _inflate_stream content_encoding.obj : error LNK2019: unresolved external symbol _inflateInit2_ referenced in function _inflate_stream ..\builds\libcurl-vc14-x86-debug-dll-ssl-dll-zlib-dll-ipv6-sspi-obj-lib\libcurl_debug.dll : fatal error LNK1120: 5 unresolved externals I have been using the same zlibwapi library to build libcurl in 7.38.0, 7.44.0 and 7.51.0. Maybe the compiler/linker flags have been changed or previous version that uses specific make file, e.g. curl-7.51.0\lib\Makefile.vc14, has different settings? Alex Chen From: curl-library <[email protected]> on behalf of Ray Satiro via curl-library <[email protected]> Reply-To: libcurl development <[email protected]> Date: Friday, January 12, 2018 at 9:10 PM To: <[email protected]> Cc: Ray Satiro <[email protected]> Subject: Re: Building libcurl 7.57 on Windows On 1/12/2018 8:03 PM, Alex Chen via curl-library wrote: I recently downloaded libcurl 7.57 and tried to build it on Windows but failed. I was able to build 7.51 on Windows without problem. The major change is that the file curl-7.51.0/lib/Makefile.vc14 is gone from curl-7.57-0/lib. My build script used to call ‘nmake’ with that make file as input. Since that file is gone, the build script cannot continue. I notice there seems to be stuff for ‘cmake’. What is the correct process to build libcurl 7.57 on Windows now? I think what you are referring to was retired in favor of the vc makefiles in the winbuild folder. Check the README, from the VS command prompt it will be something like nmake /f Makefile.vc mode=dll VC=10 Alternatively there's pregenerated Visual Studio project files in the projects folder, in some common configurations. And cmake. And autotools (./configure && make). So there are at least 4 ways to build for Windows still. ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
