Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
2.4.0, 2.4.1, 2.4.1 (rev.12), 2.4.1 (rev.25), 2.4.1 (rev.28), 2.4.2
-
None
-
Visual Studio 2019 Professional 16.3.6
Qt 5.13.2
-
-
94881b1e278a8db0de04825d816953f82b629ec1
Description
When attempting to build certain projects with Windows resources (.RC file) with Qt VS Tools enabled, the first build (right-click and choose "Rebuild", or "Clean" and then "Build") results in link errors. The second build succeeds. When the project is converted back to regular type (by removing <Keyword>QtVS_v301</Keyword> from .vcxproj file) - the issue goes away.
I stripped out everything except the bare minimum in our solution to replicate the issue.
To replicate:
1) Extract the attached Test.zip
2) Open System.sln
3) Right-click "SAS" project and choose "Rebuild", the following error occurs:
1>SAS.vcxproj -> c:\Temp\dummy\SAS\..\programsDebug\SAS.dll
1>SAS.vcxproj -> ..\programsDebug\SAS.pdb (Full PDB)
1>SAS.def : error LNK2001: unresolved external symbol StartProcess
4) Try to rebuild again - same error result
5) Right click "SAS" and choose "Build", the builds succeeds:
1>SAS.vcxproj -> c:\Temp\dummy\SAS\..\programsDebug\SAS.dll
1>SAS.vcxproj -> ..\programsDebug\SAS.pdb (Full PDB)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
6) Manually edit SAS.vcxproj and remove " <Keyword>QtVS_v301</Keyword>" line
7) Right-click "SAS" project and choose "Rebuild", the build succeeds
8) Restore the project to Qt by putting the keyword back
9) Rebuild - resulting in error
10) Remove the RC file. Rebuild - resulting in success.
Attachments
Issue Links
- is duplicated by
-
QTVSADDINBUG-710 Link error "unresolved external symbol WinMainCRTStartUp" in project with windows resources
- Closed