-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
winbuild: fail to build WITH_ZLIB=static #11521
Conversation
@@ -262,8 +262,8 @@ ZLIB_LIBS = zlib.lib | |||
USE_ZLIB = true | |||
ZLIB = dll | |||
!ELSEIF "$(WITH_ZLIB)"=="static" | |||
!IF EXISTS("$(ZLIB_LIB_DIR)\zlibstat.lib") | |||
ZLIB_LIBS = zlibstat.lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a typo, the visual studio zlibstat project's output is zlibstat.lib. Where are you getting zlibstatic.lib from? Are you using a different build method?
I use cmake generate visual studio project. It's zlib's bug, may be. |
@@ -265,6 +265,8 @@ ZLIB = dll | |||
!IF EXISTS("$(ZLIB_LIB_DIR)\zlibstat.lib") | |||
ZLIB_LIBS = zlibstat.lib | |||
ADDITIONAL_ZLIB_CFLAGS = /DZLIB_WINAPI | |||
!ELSEIF EXISTS("$(ZLIB_LIB_DIR)\zlibstatic.lib") | |||
ZLIB_LIBS = zlibstatic.lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarcelRaad can you confirm- unlike zlib's contrib VS project files, something like zlibstatic.lib (cmake outfile) doesn't need /DZLIB_WINAPI
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I can confirm that ZLIB_WINAPI
is only defined by the VS projects by default.
Thanks |
- Check for zlib static library name zlibstatic.lib. zlib's static library has a different name depending on how it was built. zlibstatic.lib is output by cmake. zlibstat.lib is output by their pre-generated Visual Studio project files (in the contrib directory) and defines ZLIB_WINAPI (ie it's meant to use stdcall instead of cdecl if you end up exporting the zlib functions). Prior to this change the makefile only checked for the latter. Closes curl#11521
No description provided.