CMake link error while compiling itself: Unresolved external symbol cm_zlib_crc32 in VS 2022 on master
While rebasing on master CMake from some "old" CMake (~v3.18) I've got an linker error related to cm_zlib_crc32()
function.
After bisecting via git bisect
, I found the commmits fc22ac115e7393e584e3c
(removes the zlib with patch that mangling names) and 29c578c8fbfadd148e4d7
(fixes patch with mangling names).
But seems that this patch doesn't completely mangle the names, as the crc32()
function is expanded into the (non-existent??) cm_zlib_crc32()
function from cmzlib.lib.
Seems there are a typo inside the cm_zlib_mangle.h:22
as it defines the crc32
name as z_crc32
(instead of proper cm_zlib_crc32
)
After this micro fix, the build has completed successfully.