MSVC Debug build 3.0a3 can't find zlib.lib
yoerg opened this issue · 2 comments
yoerg commented
Building 3.0a3 as a MSVC project with
cmake -G "Visual Studio 16 2019" "../fmi-library-3.0a2"
cmake --build . --config Debug
failes to link fmizip.lib and aborts the build:
fmizip.vcxproj -> C:\Hubele\scm\faster-bitbucket\fmi-library-build\buildMSVC30a3\Debug\fmizip.lib
LINK : fatal error LNK1104: cannot open file 'zlibext\Debug\zlib.lib' [C:\Hubele\scm\faster-bitbuck
et\fmi-library-build\buildMSVC30a3\compress_test_fmu_zip.vcxproj]
The reason appears to be that the zlib Debug configuration build produces a zlibd.lib instead of zlib.lib. I've attached a crude workaround.
cmake version 3.26.4
nilotpalutkalit commented
Another workaround is to use find_package for zlib by enabling "FMILIB_FIND_PACKAGE_ZLIB" in CMAKE Options
modelonrobinandersson commented
Thank you both for your suggestions, I'll see if we can resolve this by next week.