You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Makefile.msc only makes release builds and provides no way to make a debug build, which makes it harder to use generated libraries in debug configurations because VC++ CRT (C/C++ runtime) for debug and release builds are different. Specifically, -MD is used unconditionally on this line in Makefile.msc:
I do realize that there's a CMake build, but I find Makefile.msc cleaner for my purposes and since it's a part of the core project, it probably should work for commonly used configurations.
The text was updated successfully, but these errors were encountered:
One thing to mention that in the past I couldn't use CMake because it was configured such that using --prefix with cmake --install failed to copy build artifacts into the specified location and instead forced a copy into the protected C:\Program Files\ directory, which some Open Source projects mistakenly consider analogous to /usr/local/. In addition to this, release builds were not configured to generate debug symbols. I guess now that nmake is gone, I will have to create patches for CMake files to address these issues.
Makefile.msc
only makes release builds and provides no way to make a debug build, which makes it harder to use generated libraries in debug configurations because VC++ CRT (C/C++ runtime) for debug and release builds are different. Specifically,-MD
is used unconditionally on this line inMakefile.msc
:The fix is fairly simple and is to remove
-MD
fromCFLAGS
and add it conditionally, based on whetherDEBUG=1
is defined.This also adds
NDEBUG
, which is needed forassert
calls to work properly for release builds (i.e. should be no-op in release builds).This would build debug and release libraries.
You can find a full patch here:
https://github.com/StoneStepsInc/zlib-nuget/blob/master/patches/Makefile.msc.patch
I do realize that there's a CMake build, but I find
Makefile.msc
cleaner for my purposes and since it's a part of the core project, it probably should work for commonly used configurations.The text was updated successfully, but these errors were encountered: