madler / zlib

A massively spiffy yet delicately unobtrusive compression library.
http://zlib.net/
Other
5.58k stars 2.43k forks source link

Link error when building zlibvc with Visual Studio 2022 (x64, release) #994

Closed tbentley-mdsol closed 1 month ago

tbentley-mdsol commented 1 month ago

I downloaded version 1.3.1 from the release area of the zlib github. I opened the zlibvc solution file in Visual Studio 2022. Selected Release/x64. Selected build for the zlibvc project. I received the following error. 1>------ Build started: Project: zlibvc, Configuration: Release x64 ------ 1>.\zlibvc.def(4): fatal error LNK1118: syntax error in 'VERSION' statement 1>Done building project "zlibvc.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== It seems that the VERSION value can only include the Major and Minor versions. Including the Patch version causes the error. If I change VERSION from 1.3.1 to 1.3. The code links fine.

tbentley-mdsol commented 1 month ago

I see that this was fixed in develop. The fix hasn't been released yet.
Are there tests done to prevent this issue again?

madler commented 1 month ago

Yes, this has been fixed.

No, there are no tests done with the VC projects. Those projects have been superceded by the ability to construct them on demand using cmake, so I am considering deleting all of them from the distribution.