Error during building Qt6 + MSVC2019
Unsolved
Qt 6
-
I'm trying to build latest Qt6 dev build for windows.
Configure summary:
Building for: win32-msvc (x86_64, CPU features: sse sse2)
Compiler: msvc 19.28.29336.0
Windows 10and i've got next error, in this file, and in several others with the same error (in this module)
FAILED: qtquickcontrols2/src/quicktemplates2/CMakeFiles/qtquicktemplates2plugin.dir/qtquicktemplates2plugin.cpp.obj C:\PROGRA~2\MICROS~2\2019\PROFES~1\VC\Tools\MSVC\1428~1.293\bin\Hostx86\x64\cl.exe /nologo /TP -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_EXCEPTIONS -DQT_OPENGL_LIB -DQT_PLUGIN -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICKTEMPLATES2_LIB -DQT_QUICK_LIB -DUNICODE -DWIN32 -DWIN64 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -Dqtquicktemplates2plugin_EXPORTS -Iqtquickcontrols2\src\quicktemplates2\qtquicktemplates2plugin_autogen\include -Iqtquickcontrols2\src\quicktemplates2 -Iqtbase\include -Iqtbase\mkspecs\win32-msvc -Iqtbase\include\QtQml -Iqtbase\include\QtCore -Iqtbase\include\QtNetwork -Iqtbase\include\QtQuickTemplates2 -Iqtbase\include\QtGui -Iqtbase\include\QtQuick -Iqtbase\include\QtQmlModels -Iqtbase\include\QtOpenGL -Iqtbase\include\QtQuickTemplates2\6.2.0 -Iqtbase\include\QtQuickTemplates2\6.2.0\QtQuickTemplates2 -Iqtdeclarative\src\qmlmodels -Iqtbase\include\QtQmlModels\6.2.0 -Iqtbase\include\QtQmlModels\6.2.0\QtQmlModels -Iqtbase\src\corelib -Iqtbase\include\QtCore\6.2.0 -Iqtbase\include\QtCore\6.2.0\QtCore -Iqtdeclarative\src\qml -Iqtbase\include\QtQml\6.2.0 -Iqtbase\include\QtQml\6.2.0\QtQml /DWIN32 /D_WINDOWS /GR /Zi /RTC1 -MDd /W3 /wd4530 /wd4577 /WX -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:externConstexpr -Zc:wchar_t -Zc:__cplusplus -permissive- -utf-8 -std:c++17 /showIncludes /Foqtquickcontrols2\src\quicktemplates2\CMakeFiles\qtquicktemplates2plugin.dir\qtquicktemplates2plugin.cpp.obj /Fdqtquickcontrols2\src\quicktemplates2\CMakeFiles\qtquicktemplates2plugin.dir\ /FS -c qtquickcontrols2\src\quicktemplates2\qtquicktemplates2plugin.cpp qtquickcontrols2\src\quicktemplates2\qtquicktemplates2plugin.cpp(87): error C2220: the following warning is treated as an error qtquickcontrols2\src\quicktemplates2\qtquicktemplates2plugin.cpp(87): warning C4138: '*/' found outside of comment
This happened because there is a flag /WX, which means treat warnings as an error.
At qtquickcontrols2\src\quicktemplates2\qtquicktemplates2plugin.cpp(87) line source code have next code:void QtQuickTemplates2Plugin::registerTypes(const char */*uri*/)
And visual studio marks this as a warnings. Can please help me anyone, how can I fix this? How do disable /WX flag, or is there another way out?
-
Hi,
As a workaround you can either uncomment the parameter name or just remove it.