stachenov/quazip

Error compiling quazip

lincolningaroca opened this issue · 9 comments

Hi guys, I have the following error when trying to compile quazip in the terminal, I already have the zlib library compiled in a zlib folder, in the root of the project, but it still does not compile quazip, any suggestion would be appreciated.

image

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.

image
image
image

Thanks for your answer, now I get this error, it finds zlib but not the headers, that's what I think is happening.

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.

Hello again, after having tried to compile the new version 1.2, as I keep getting the same errors that I previously reported, and well the truth is that I no longer know what to do, I would appreciate any help.
image
image
image

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).

Ok thank you very much, so I am and if you can generate the library, thank you again for your answer, greetings.

image
image