Description
Hello Miquel,
We are using precompiled headers in our projects. And when I use VS 2017 and the VS Tools 2.7.1, I can convert and compile everything without a problem.
Before VS Tools 2.8.0 was installed in VS 2022 I could load the solution build etc.
Now with VS 2022 and VS 2.8.0 installed, I can load the solution but I have a problem with building qrc files.
It looks like that the compiler won't get the required flags for these files.
For example ZIP.C could be compiled with
/Gd /TC /wd4100 /wd4101 /wd4189 /wd4127 /wd4018 /wd4189 /wd4100 /wd4309 /wd4189 /wd4577 /wd4467 /FC /errorReport:prompt -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:_cplusplus /arch:AVX /Zc:rvalueCast /Zc:inline /Zc:strictStrings /Zc:throwingNew /Zc:referenceBinding /Zc:_cplusplus -w34100 -w34189 -w44996 -w44100 -w44309 -w44189 -w44456 -w44457 -w44458
Task "CL"
8> Read Tracking Logs:
8> debug\Common.tlog\CL.read.1.tlog
8> Outputs for E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\ZIP\IOAPI.C|E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\ZIP\UNZIP.C|E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\ZIP\ZIP.C:
8> E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\DEBUG\IOAPI.OBJ
8> E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\DEBUG\UNZIP.OBJ
8> E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\DEBUG\ZIP.OBJ
8> zip\ioapi.c will be compiled because it was not found in the tracking log.
8> zip\unzip.c will be compiled because it was not found in the tracking log.
8> zip\zip.c will be compiled because it was not found in the tracking log.
8> No output for E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\ZIP\IOAPI.C|E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\ZIP\UNZIP.C|E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\ZIP\ZIP.C was found in the tracking log; source compilation required.
8> Write Tracking Logs:
8> debug\Common.tlog\CL.write.1.tlog
8> Environment Variables passed to tool:
8> VS_UNICODE_OUTPUT=2524
8> C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe /c /IDebug /I. /I..\..\Vendor\zlib /IBreakpad /IBreakpad\src /Idebug /I/include /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui\5.15.2\QtGui /IE:\dev\Qt\5.15.2\msvc2019_64\include /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtMultimedia /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCharts /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtWidgets /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtANGLE /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork\5.15.2\QtNetwork /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore\5.15.2\QtCore /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtXml /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtPositioning /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtSerialPort /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore /I/include /I"E:\dev\Qt\5.15.2\msvc2019_64\mkspecs\win32-msvc" /IDebug /Zi /nologo /W3 /WX- /diagnostics:classic /MP /Od /D WINDOWS /D UNICODE /D _UNICODE /D WIN32 /D _ENABLE_EXTENDED_ALIGNED_STORAGE /D WIN64 /D QT_DEPRECATED_WARNINGS /D NOMINMAX /D WIN32_LEAN_AND_MEAN /D PATH_RTSA_PRI=E:/Aaronia/trunk/Sources/RTSA /D UNICODE /D _UNICODE /D WIN32 /D _ENABLE_EXTENDED_ALIGNED_STORAGE /D WIN64 /D QT_MULTIMEDIA_LIB /D QT_CHARTS_LIB /D QT_WIDGETS_LIB /D QT_GUI_LIB /D QT_XML_LIB /D QT_NETWORK_LIB /D QT_POSITIONING_LIB /D QT_SERIALPORT_LIB /D QT_CORE_LIB /Gm- /EHsc /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++17 /Fo"debug
" /Fd"debug\Common.pdb" /Gd /TC /wd4100 /wd4101 /wd4189 /wd4127 /wd4018 /wd4189 /wd4100 /wd4309 /wd4189 /wd4577 /wd4467 /FC /errorReport:prompt -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:cplusplus /arch:AVX /Zc:rvalueCast /Zc:inline /Zc:strictStrings /Zc:throwingNew /Zc:referenceBinding /Zc:_cplusplus -w34100 -w34189 -w44996 -w44100 -w44309 -w44189 -w44456 -w44457 -w44458 zip\ioapi.c zip\unzip.c zip\zip.c
8> Tracking command:
8> C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Tracker.exe /d "C:\Program Files (x86)\MSBuild\15.0\FileTracker\FileTracker32.dll" /i E:\Aaronia\trunk\Sources\RTSA\Libraries\Common\debug\Common.tlog /r "E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\ZIP\IOAPI.C|E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\ZIP\UNZIP.C|E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\ZIP\ZIP.C" /b MSBuildConsole_CancelEvent3cd6b60fc21543ae988a30298f30cee3 /c "C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe" /c /IDebug /I. /I..\..\Vendor\zlib /IBreakpad /IBreakpad\src /Idebug /I/include /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui\5.15.2\QtGui /IE:\dev\Qt\5.15.2\msvc2019_64\include /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtMultimedia /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCharts /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtWidgets /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtANGLE /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork\5.15.2\QtNetwork /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore\5.15.2\QtCore /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtXml /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtPositioning /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtSerialPort /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore /I/include /I"E:\dev\Qt\5.15.2\msvc2019_64\mkspecs\win32-msvc" /IDebug /Zi /nologo /W3 /WX- /diagnostics:classic /MP /Od /D WINDOWS /D UNICODE /D _UNICODE /D WIN32 /D _ENABLE_EXTENDED_ALIGNED_STORAGE /D WIN64 /D QT_DEPRECATED_WARNINGS /D NOMINMAX /D WIN32_LEAN_AND_MEAN /D PATH_RTSA_PRI=E:/Aaronia/trunk/Sources/RTSA /D UNICODE /D _UNICODE /D WIN32 /D _ENABLE_EXTENDED_ALIGNED_STORAGE /D WIN64 /D QT_MULTIMEDIA_LIB /D QT_CHARTS_LIB /D QT_WIDGETS_LIB /D QT_GUI_LIB /D QT_XML_LIB /D QT_NETWORK_LIB /D QT_POSITIONING_LIB /D QT_SERIALPORT_LIB /D QT_CORE_LIB /Gm- /EHsc /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++17 /Fo"debug
" /Fd"debug\Common.pdb" /Gd /TC /wd4100 /wd4101 /wd4189 /wd4127 /wd4018 /wd4189 /wd4100 /wd4309 /wd4189 /wd4577 /wd4467 /FC /errorReport:prompt -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:cplusplus /arch:AVX /Zc:rvalueCast /Zc:inline /Zc:strictStrings /Zc:throwingNew /Zc:referenceBinding /Zc:_cplusplus -w34100 -w34189 -w44996 -w44100 -w44309 -w44189 -w44456 -w44457 -w44458 zip\ioapi.c zip\unzip.c zip\zip.c
8> ioapi.c
8> unzip.c
8> zip.c
8> Done executing task "CL".
The QRC_Res_Common.cpp compile will get only these flags: /Gd /TP /wd4100 /wd4101 /wd4189 /wd4127 /wd4018 /wd4189 /wd4100 /wd4309 /wd4189 /wd4577 /wd4467
Missing flags : -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus
I guess they are introduced automatically from the msbuild for the 'native' source files and not for this resource cpp which was probably created from the qt resource compiler.
8> Task "CL" skipped, due to false condition; ('%(ClCompile.PrecompiledHeader)' Unable to render embedded object: File (= 'Create' and '%(ClCompile.ExcludedFromBuild)') not found.='true' and '%(ClCompile.CompilerIteration)' == '' and @(ClCompile) Unable to render embedded object: File (= '') was evaluated as ('Create' != 'Create' and '') not found.='true' and '' == '' and CommonPrecompiledHeader.h.cpp != '').
8> Task "CL"
8> Read Tracking Logs:
8> debug\Common.tlog\CL.read.1.tlog
8> Outputs for E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\DEBUG\QRC_RES_COMMON.CPP:
8> E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\DEBUG\QRC_RES_COMMON.OBJ
8> Debug\qrc_Res_Common.cpp will be compiled because it was not found in the tracking log.
8> Outputs for E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\DEBUG\QRC_RES_COMMON.CPP:
8> E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\DEBUG\QRC_RES_COMMON.OBJ
8> Write Tracking Logs:
8> debug\Common.tlog\CL.write.1.tlog
8> Environment Variables passed to tool:
8> VS_UNICODE_OUTPUT=4544
8> C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe /c /IDebug /IE:\Aaronia\trunk\Sources\RTSA\Libraries\Common\ /I. /I..\..\Vendor\zlib /IBreakpad /IBreakpad\src /Idebug /I/include /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui\5.15.2\QtGui /IE:\dev\Qt\5.15.2\msvc2019_64\include /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtMultimedia /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCharts /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtWidgets /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtANGLE /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork\5.15.2\QtNetwork /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore\5.15.2\QtCore /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtXml /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtPositioning /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtSerialPort /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore /I/include /I"E:\dev\Qt\5.15.2\msvc2019_64\mkspecs\win32-msvc" /IDebug /Zi /nologo /W3 /WX- /diagnostics:classic /MP /Od /D _WINDOWS /D UNICODE /D _UNICODE /D WIN32 /D _ENABLE_EXTENDED_ALIGNED_STORAGE /D WIN64 /D QT_DEPRECATED_WARNINGS /D NOMINMAX /D WIN32_LEAN_AND_MEAN /D PATH_RTSA_PRI=E:/Aaronia/trunk/Sources/RTSA /D UNICODE /D _UNICODE /D WIN32 /D _ENABLE_EXTENDED_ALIGNED_STORAGE /D WIN64 /D QT_MULTIMEDIA_LIB /D QT_CHARTS_LIB /D QT_WIDGETS_LIB /D QT_GUI_LIB /D QT_XML_LIB /D QT_NETWORK_LIB /D QT_POSITIONING_LIB /D QT_SERIALPORT_LIB /D QT_CORE_LIB /Gm- /EHsc /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++17 /Yu"CommonPrecompiledHeader.h" /Fp"debug
Common.pch" /Fo"debug
" /Fd"debug\Common.pdb" /Gd /TP /wd4100 /wd4101 /wd4189 /wd4127 /wd4018 /wd4189 /wd4100 /wd4309 /wd4189 /wd4577 /wd4467 /FICommonPrecompiledHeader.h /FC /errorReport:prompt Debug\qrc_Res_Common.cpp
8> Tracking command:
8> C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Tracker.exe /d "C:\Program Files (x86)\MSBuild\15.0\FileTracker\FileTracker32.dll" /i E:\Aaronia\trunk\Sources\RTSA\Libraries\Common\debug\Common.tlog /r E:\AARONIA\TRUNK\SOURCES\RTSA\LIBRARIES\COMMON\DEBUG\QRC_RES_COMMON.CPP /b MSBuildConsole_CancelEvent04ecb594eb14479da9b99308d100ef43 /c "C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe" /c /IDebug /IE:\Aaronia\trunk\Sources\RTSA\Libraries\Common\ /I. /I..\..\Vendor\zlib /IBreakpad /IBreakpad\src /Idebug /I/include /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui\5.15.2\QtGui /IE:\dev\Qt\5.15.2\msvc2019_64\include /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtMultimedia /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCharts /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtWidgets /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtGui /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtANGLE /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork\5.15.2\QtNetwork /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore\5.15.2 /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore\5.15.2\QtCore /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtXml /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtNetwork /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtPositioning /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtSerialPort /IE:\dev\Qt\5.15.2\msvc2019_64\include\QtCore /I/include /I"E:\dev\Qt\5.15.2\msvc2019_64\mkspecs\win32-msvc" /IDebug /Zi /nologo /W3 /WX- /diagnostics:classic /MP /Od /D _WINDOWS /D UNICODE /D _UNICODE /D WIN32 /D _ENABLE_EXTENDED_ALIGNED_STORAGE /D WIN64 /D QT_DEPRECATED_WARNINGS /D NOMINMAX /D WIN32_LEAN_AND_MEAN /D PATH_RTSA_PRI=E:/Aaronia/trunk/Sources/RTSA /D UNICODE /D _UNICODE /D WIN32 /D _ENABLE_EXTENDED_ALIGNED_STORAGE /D WIN64 /D QT_MULTIMEDIA_LIB /D QT_CHARTS_LIB /D QT_WIDGETS_LIB /D QT_GUI_LIB /D QT_XML_LIB /D QT_NETWORK_LIB /D QT_POSITIONING_LIB /D QT_SERIALPORT_LIB /D QT_CORE_LIB /Gm- /EHsc /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /std:c++17 /Yu"CommonPrecompiledHeader.h" /Fp"debug
Common.pch" /Fo"debug
" /Fd"debug\Common.pdb" /Gd /TP /wd4100 /wd4101 /wd4189 /wd4127 /wd4018 /wd4189 /wd4100 /wd4309 /wd4189 /wd4577 /wd4467 /FICommonPrecompiledHeader.h /FC /errorReport:prompt Debug\qrc_Res_Common.cpp
8> qrc_Res_Common.cpp
8> e:\aaronia\trunk\sources\rtsa\libraries\common\debug\qrc_res_common.cpp : error C2855: command-line option '/Zc:referenceBinding' inconsistent with precompiled header
8> e:\aaronia\trunk\sources\rtsa\libraries\common\debug\qrc_res_common.cpp : error C2855: command-line option '/Zc:__cplusplus' inconsistent with precompiled header
8> e:\aaronia\trunk\sources\rtsa\libraries\common\debug\qrc_res_common.cpp : warning C4651: '/D_AVX_' specified for precompiled header but not for current compile
8> e:\aaronia\trunk\sources\rtsa\libraries\common\debug\qrc_res_common.cpp : warning C4651: '/D_NO_PREFETCHW' specified for precompiled header but not for current compile
8> The command exited with code 2.
8> Done executing task "CL" – FAILED.
8> Done building target "ClCompile" in project "Common.vcxproj" – FAILED.
I will send you a msbuild.binlog per email.
Best regards
Alex
Attachments
Issue Links
- depends on
-
QTVSADDINBUG-950 Get Qt build settings from 'vcapp' qmake template
- Closed
- relates to
-
QTVSADDINBUG-936 RCC dynamic C++ source file fails to compile with precompiled header
- Closed