stachenov / quazip

Qt/C++ wrapper over minizip
Other
582 stars 232 forks source link

Failed to build Quazip with Qt6.5.0 (MacOS M1 ventura) #173

Closed geustache closed 1 year ago

geustache commented 1 year ago

Hello Quazip compiles well with Qt6.4.3 on Mac (universal binary) but an error appears from Qt6.5.0 Compilation : MacOS M1 ventura

In file included from /Volumes/CLOUD/dev/git/dependencies2/3rdParty/sources/quazip/quazip/quazipnewinfo.cpp:25:
In file included from /Volumes/CLOUD/dev/Qt/6.5.0/macos/lib/QtCore.framework/Headers/QFileInfo:1:
/Volumes/CLOUD/dev/Qt/6.5.0/macos/lib/QtCore.framework/Headers/qfileinfo.h:100:22: error: 'path' is unavailable: introduced in macOS 10.15
    std::filesystem::path filesystemAbsolutePath() const
                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__filesystem/path.h:442:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
aikawayataro commented 1 year ago

This is not a quazip bug nor Qt bug. It's related to cxx 17 support on macOS. When compiling Qt, specify -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 to CMake.

aikawayataro commented 1 year ago

If you are using prebuilt Qt, specify this option when configuring your project.

geustache commented 1 year ago

Thanks @aikawayataro :-) It is however well specified in the Qt documentation Target for MacOs with Qt6 : macOS 11, 12, 13