spatial-model-editor / sme_deps_common

various libraries statically compiled for linux / macOS / windows
MIT License
2 stars 0 forks source link

Qt also bundles libz #18

Closed lkeegan closed 2 years ago

lkeegan commented 2 years ago

Example issue when building sme:

D:/a/_temp/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/smelibs/lib/libQt6BundledZLIB.a(crc32.c.obj):crc32.c:(.text+0x560): multiple definition of `crc32_combine_gen64'; C:/smelibs/lib/libz.a(crc32.obj):crc32.c:(.text+0xc00): first defined here

Not sure why this error didn't occur previously - but if possible we should remove our libz and link to the Qt one wherever libz is needed.

Should be straightforward - we currently don't use any cmake config for zlib but just pass in location of our statically compiled lib and headers, and Qt uses the same location and names for all operating systems:

lkeegan commented 2 years ago

This didn't work as the bundled Qt libz headers are modified to include Qt-related stuff. Will instead try adding a static libz to the Qt build and linking Qt to that one.