Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 5.0.0-beta1
-
None
Description
Since the newly introduced __cplusplus version check https://codereview.qt-project.org/c/qt/qtbase/+/334623 , Qt Creator's CMake based and Qbs based build systems fails with Msvc like so:
C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.299\bin\HostX64\x64\cl.exe /nologo /TP -DCPLUSPLUS_BUILD_LIB -DQT_CONCURRENT_LIB -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_CREATOR -DQT_DISABLE_DEPRECATED_BEFORE=0x050900 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_JAVA_STYLE_ITERATORS -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DRELATIVE_DATA_PATH=\"../share/qtcreator\" -DRELATIVE_DOC_PATH=\"../share/doc/qtcreator\" -DRELATIVE_LIBEXEC_PATH=\"\" -DRELATIVE_PLUGIN_PATH=\"../lib/qtcreator/plugins\" -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWIN64 -DWINVER=0x0602 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D_WIN32_WINNT=0x0602 -D_WIN64 -Isrc\libs\3rdparty\cplusplus -IC:\Users\alportal\dev\tqtc-qtc-super\qtcreator\src\libs\3rdparty\cplusplus -Isrc\libs\3rdparty\cplusplus\3rd_cplusplus_autogen\include -IC:\Users\alportal\dev\qt6_desktop\qtbase\include -IC:\Users\alportal\dev\qt6_desktop\qtbase\include\QtCore -IC:\Users\alportal\dev\qt6_desktop\qtbase\mkspecs\win32-msvc -IC:\Users\alportal\dev\tqtc-qtc-super\qtcreator\src\libs -IC:\Users\alportal\dev\qt6_desktop\qtbase\include\QtConcurrent -IC:\Users\alportal\dev\qt6_desktop\qtbase\include\QtNetwork -IC:\Users\alportal\dev\qt6_desktop\qtbase\include\QtGui -IC:\Users\alportal\dev\qt6_desktop\qtbase\include\QtWidgets -IC:\Users\alportal\dev\qt6_desktop\qtbase\include\QtCore5Compat -IC:\Users\alportal\dev\tqtc-qtc-super\qtcreator\src\libs\3rdparty /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /permissive- -std:c++17 /showIncludes /Fosrc\libs\3rdparty\cplusplus\CMakeFiles\3rd_cplusplus.dir\Token.cpp.obj /Fdsrc\libs\3rdparty\cplusplus\CMakeFiles\3rd_cplusplus.dir\ /FS -c C:\Users\alportal\dev\tqtc-qtc-super\qtcreator\src\libs\3rdparty\cplusplus\Token.cpp C:\Users\alportal\dev\qt6_desktop\qtbase\include\QtCore\../../src/corelib/global/qglobal.h(94): fatal error C1189: #error: "Qt requires a C++17 compiler, and a suitable value for __cplusplus. On MSVC, you must pass the /Zc:__cplusplus option to the compiler."
This is how Qt Creator Qbs-based build system fails:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX64\x64\cl.exe /nologo /c /EHsc /Od /Zi /MDd /IC:\Users\alportal\dev\qt6_desktop\qtbase\include /IC:\Users\alportal\dev\qt6_desktop\qtbase\include\QtCore5Compat /IC:\Users\alportal\dev\qt6_desktop\qtbase\include\QtCore /IC:\Users\alportal\dev\qt6_desktop\qtbase\mkspecs\win32-msvc /IC:\Users\alportal\dev\tqtc-qtc-super\build-qtcreator-Qt_6_2_0_win32_msvc-Debug\Debug_Qt_6_2_0_a988d25012f674ca\qtcreator-ctrlc-stub.c1731d4b\qt.headers /experimental:external /DUNICODE /D_UNICODE /DWIN32 /DQT_CREATOR "/DIDE_LIBRARY_BASENAME="\^""lib"\^""" "/DRELATIVE_PLUGIN_PATH="\^""../lib/qtcreator/plugins"\^""" "/DRELATIVE_LIBEXEC_PATH="\^""."\^""" "/DRELATIVE_DATA_PATH="\^""../share/qtcreator"\^""" "/DRELATIVE_DOC_PATH="\^""../share/doc/qtcreator"\^""" /DQT_NO_CAST_TO_ASCII /DQT_RESTRICTED_CAST_FROM_ASCII "/DQT_DISABLE_DEPRECATED_BEFORE=0x050900" /DQT_USE_QSTRINGBUILDER /DWITH_TESTS /D_CRT_SECURE_NO_WARNINGS /DQT_CORE5COMPAT_LIB /DQT_CORE_LIB "/DWINVER=0x0601" "/D_WIN32_WINNT=0x0601" "/D_WIN32_WINDOWS=0x0601" /Fdqtcreator_ctrlc_stub.cl.pdb /FoC:\Users\alportal\dev\tqtc-qtc-super\build-qtcreator-Qt_6_2_0_win32_msvc-Debug\Debug_Qt_6_2_0_a988d25012f674ca\qtcreator-ctrlc-stub.c1731d4b\856b2c007091946b_cpp.obj C:\Users\alportal\dev\tqtc-qtc-super\qtcreator\src\shared\qtcreator_pch.h /TP /std:c++17 /Yc /FpC:\Users\alportal\dev\tqtc-qtc-super\build-qtcreator-Qt_6_2_0_win32_msvc-Debug\Debug_Qt_6_2_0_a988d25012f674ca\qtcreator-ctrlc-stub.c1731d4b\qtcreator_ctrlc_stub_cpp.pch /FoC:\Users\alportal\dev\tqtc-qtc-super\build-qtcreator-Qt_6_2_0_win32_msvc-Debug\Debug_Qt_6_2_0_a988d25012f674ca\qtcreator-ctrlc-stub.c1731d4b\856b2c007091946b_cpp.obj C:\Users\alportal\dev\tqtc-qtc-super\qtcreator\src\shared\qtcreator_pch.h /FS /w44996 C:\Users\alportal\dev\qt6_desktop\qtbase\include\QtCore\../../src/corelib/global/qglobal.h(94): fatal error C1189: #error: "Qt requires a C++17 compiler, and a suitable value for __cplusplus. On MSVC, you must pass the /Zc:__cplusplus option to the compiler."
Attachments
Issue Links
- relates to
-
QBS-1655 "Qt requires a C++17 compiler, and a suitable value for __cplusplus" error when building Qbs project with Qt 6.2
- Closed