Qt 6 on mac monterey
-
My (new install of qt) build fails, up to date xcode
[plasma] /Users/jam/plot [535]% gcc --version
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin...
/opt/Qt/6.3.2/macos/lib/QtCore.framework/Headers/qcompilerdetection.h:559:6: error: Qt requires a C++11 compiler and yours does not seem to be that.error Qt requires a C++11 compiler and yours does not seem to be that.
^/opt/Qt/6.3.2/macos/lib/QtCore.framework/Headers/qcompilerdetection.h:969:4: error: "Qt6 requires Unicode string support in both the compiler and the standard library"
error "Qt6 requires Unicode string support in both the compiler and the standard library"
^
In file included from main.cpp:1:
In file included from /opt/Qt/6.3.2/macos/lib/QtWidgets.framework/Headers/QApplication:1:
In file included from /opt/Qt/6.3.2/macos/lib/QtWidgets.framework/Headers/qapplication.h:43:
In file included from /opt/Qt/6.3.2/macos/lib/QtWidgets.framework/Headers/qtwidgetsglobal.h:43:
In file included from /opt/Qt/6.3.2/macos/lib/QtGui.framework/Headers/qtguiglobal.h:43:
/opt/Qt/6.3.2/macos/lib/QtCore.framework/Headers/qglobal.h:143:6: error: "Qt requires a C++17 compiler"error "Qt requires a C++17 compiler"
...
What on earth is the issue. My project builds on linux (I'm using SuSE tumblewerd) but I wanted to do some debug.
James
-
My (new install of qt) build fails, up to date xcode
[plasma] /Users/jam/plot [535]% gcc --version
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin...
/opt/Qt/6.3.2/macos/lib/QtCore.framework/Headers/qcompilerdetection.h:559:6: error: Qt requires a C++11 compiler and yours does not seem to be that.error Qt requires a C++11 compiler and yours does not seem to be that.
^/opt/Qt/6.3.2/macos/lib/QtCore.framework/Headers/qcompilerdetection.h:969:4: error: "Qt6 requires Unicode string support in both the compiler and the standard library"
error "Qt6 requires Unicode string support in both the compiler and the standard library"
^
In file included from main.cpp:1:
In file included from /opt/Qt/6.3.2/macos/lib/QtWidgets.framework/Headers/QApplication:1:
In file included from /opt/Qt/6.3.2/macos/lib/QtWidgets.framework/Headers/qapplication.h:43:
In file included from /opt/Qt/6.3.2/macos/lib/QtWidgets.framework/Headers/qtwidgetsglobal.h:43:
In file included from /opt/Qt/6.3.2/macos/lib/QtGui.framework/Headers/qtguiglobal.h:43:
/opt/Qt/6.3.2/macos/lib/QtCore.framework/Headers/qglobal.h:143:6: error: "Qt requires a C++17 compiler"error "Qt requires a C++17 compiler"
...
What on earth is the issue. My project builds on linux (I'm using SuSE tumblewerd) but I wanted to do some debug.
James
@jamat13 Try to enable C++17. If you use QMake add "CONFIG += c++17" to your pro file. For CMake see here https://stackoverflow.com/questions/45688522/how-to-enable-c17-in-cmake