stachenov/quazip

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.

  1. Download package called mingw-w64-x86_64-zlib from MSYS2 repo. Here: https://packages.msys2.org/package/mingw-w64-x86_64-zlib
  2. Extract the downloaded file.
  3. 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.

  1. 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:

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)

Solution of @fxdeniz works perfectly !