Error compiling quazip
lincolningaroca opened this issue · 9 comments
CMake version?
I'm using cmake 3.21
Just found some time to take a look at it.
It looks to me like you're trying to use quazip/CMakeLists.txt directly. It isn't supposed to be used like this. It's the root CMakeLists.txt that must be used.
However, if that's the case, then it should've errored out earlier, when it didn't encounter cmake_minimum_required
and other mandatory stuff. So I'm not sure it's the case.
Either way, the reason seems to be that some variables, like QUAZIP_LIB_TARGET_NAME
are missing. That, coupled with the quazip-1.1/quazip
part of your command line, lead me to thinking that using the wrong CMakeLists.txt could be the cause.
The only thing clear is that the linker is missing some symbols. The two most likely reasons are that either some library is missing, or the library that was used to compile (the headers) is different from the binary. There's definitely something wrong with your setup, but I can't tell what it is.
Can you create a simple CMake project that uses your zlib and try to compile it? Then we can at least figure out whether it's a QuaZip problem at all.
Ok thanks, I will try to compile it in another way.
You're trying to link an MSVC build of ZLIB with a MinGW build of Qt. These builds are totally binary incompatible. It's never going to work, like it wouldn't work to link a Linux app to a DLL copied from a Windows PC.
Either get a MinGW ZLIB build to link to, or set the CMake option QUAZIP_USE_QT_ZLIB
to make QuaZip use ZLIB bundled with Qt (OFF by default).