Quazip does not compile with Qt6.4 (mingw32) on Windows
geustache opened this issue · 5 comments
Hi
Quazip compiles well on Mac with the latest version of Qt6
This is not the case under Window (mingw32)
It seems that the internal ZIP folder of Qt has been changed
QtZip has become QtZipPrivate
Regards
This is a known bug in Qt6 which won't be fixed. See https://bugreports.qt.io/browse/QTBUG-111802
Really annoying!
Hi @geustache and @Isarhamster, I'll describe how I solve the issue.
- Download package called
mingw-w64-x86_64-zlib
from MSYS2 repo. Here: https://packages.msys2.org/package/mingw-w64-x86_64-zlib - Extract the downloaded file.
- You need these files from extracted archive:
/mingw64/bin/zlib1.dll
/mingw64/include/zconf.h
/mingw64/include/zlib.h
/mingw64/lib/libz.a
/mingw64/lib/libz.dll.a
4.Now you need to copy these files to Tools\mingw
directory in your Qt installation.
For example, C:\Qt\Tools\mingw1120_64
. Here mingw1120_64
is the version used with Qt 6.4.2
it maybe different for you if you're
using different version.
- Here is the list for copying files:
/mingw64/bin/zlib1.dll ----> C:\Qt\Tools\mingw1120_64\bin
/mingw64/include/zconf.h ----> C:\Qt\Tools\mingw1120_64\include
/mingw64/include/zlib.h ----> C:\Qt\Tools\mingw1120_64\include
/mingw64/lib/libz.a ----> C:\Qt\Tools\mingw1120_64\lib
/mingw64/lib/libz.dll.a ----> C:\Qt\Tools\mingw1120_64\lib
Notes:
- If you're using
QUAZIP_USE_QT_ZLIB
disable it, and re-run cmake. (My advice is that, delete everything generated during build and re-launch.) - Direct link to zlib archive: https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-zlib-1.2.13-3-any.pkg.tar.zst
Hello @fxdeniz
Thank you very much for this very detailed feedback
I will confirm you when I will have the opportunity to do this test again under qt6
Regards
Thanks for posting a procedure for getting this to work.
When I wrote "Really annoying" I meant, that all these workarounds make maintaining a multi-platform application really difficult This is why I wanted to use Qt - to avoid all these multi-platform issues and have a single source for all Linux, Mac and Windows.
Now I have to keep track of the compiler - and people cannot compile my project with Visual C++ anymore, they are limitited to a very specific gcc. This really sucks and I'm quite disappointed with Qt Digia. Open source projects become semi-open as building them is obfuscated by requirements like "get a suitable library from here and there, do this and that, then this ...".
Not to mention all those other incompatibilities with Qt6 (I have a long list of issues which are neither documented nor reported)