HI,

    I manage to use Visual Studio 2015 to compile the source code with “nmake 
-f curl-7.58.0/windbuild/Makefile.vc MACHINE=x86 VC=14 WITH_SSL=dll 
WITH_ZLIB=dll ENABLE_IPV6=yes GEN_PDB=yes MODE=dll”.

But it fails to link because it cannot find the zlib library ‘zlib.lib’.  Our 
zlib library for Windows is names ‘zlibwapi.lib/zlibwapi.dll’, not 
‘zlib.lib/zlib.dll’.  

We used to be able to redefine the macro ‘ZLIBLIBSDLL=zlibwapi.lib’ in 7.51.0 
and it will be picked up by curl-7.51.0/lib/Makefile.  

For the latest curl, there is hardcode reference to zlib in 
curl-7.58.0/windbuild/MakefileBuild.vc:

 

!IF "$(WITH_ZLIB)"=="dll"

ZLIB_LIBS   = zlib.lib

USE_ZLIB    = true

ZLIB        = dll

!ELSEIF "$(WITH_ZLIB)"=="static"

ZLIB_LIBS   = zlib_a.lib

USE_ZLIB    = true

ZLIB        = static

!ENDIF

 

But it does not have provision to pick up a different name for zlib.lib. Do I 
have to manually change the ZLIB_LIBS definition of MakefileBuild.vc?

 

Thanks.

 

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

Reply via email to