Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.4
-
None
-
Qt 4.7.0, static build
Microsoft Windows XP,
Microsoft Visual Studio 9.0 (2008) Compiler
-
c9406bcffe63f1ce232ce91b00be294e0135282a
Description
Bug description
Whenever I try to link a project incrementally in Qt Creator, I always get the message
debug\XXXXX.exe not found or not built by the last incremental link; performing full link
even though the linker call clearly shows the /INCREMENTAL option.
Further Information
It does not matter if Shadow Building is activated or not, or if nmake or jom is used, neither combination works.
If I import the .pro file into Visual Studio, Incremental Linking works properly.
If I disable Shadow Building and JOM in Qt Creator (so it uses the same folder as Visual Studio does) and build the project with Visual Studio first, then incremental linking will work in Qt Creator for the next build. However the build after that will lead to a full link again.
Visual Studio generates XXXXX.exe.intermediate.manifest while Qt Creator omits the ".exe" (Can't tell if this difference is relevant)
Visual Studio additionally generates the following files:
- XXXXX.exe.embed.manifest
- XXXXX.exe.embed.manifest.res
- mt.dep
Steps to reproduce:
- With Visual Studio 2008 (or its compiler) installed, set QMAKESPEC to win32-msvc2008
- Start Qt Creator and create a new project, e.g. Qt Console Application
- Add QMAKE_LFLAGS += /INCREMENTAL to the .pro file (Note: CONFIG += incremental did not lead to /INCREMENTAL being shown in the linker call)
- Build the project in debug mode
- Change anything in the code (e.g. remove a semicolon from main.cpp, restore it, and save)
- Build the project again => Full Link will be made instead of incremental one.
One-time Workaround
If I build the project "IncrementalTest" once in Qt Creator, then open the Visual Studio 2008 Command Prompt and enter the lines listed below, Qt Creator will link incrementally the next time (but not after that). Note how the "embed" stuff is created and included in the link command. This might be missing in the current process.
@echo 1 24 ".\\debug
IncrementalTest.exe.embed.manifest" > .\debug\rc_temp.tmpmt.exe /out:.\debug\IncrementalTest.exe.embed.manifest /notify_update /manifest .\debug\IncrementalTest.intermediate.manifest /nologo
rc.exe /fo".\debug\IncrementalTest.exe.embed.manifest.res" .\debug\rc_temp.tmp
link.exe /OUT:"debug\IncrementalTest.exe" /INCREMENTAL /LIBPATH:"C:\Qt\4.7.0_static\lib" /MANIFEST /MANIFESTFILE:"debug
IncrementalTest.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /SUBSYSTEM:CONSOLE /DYNAMICBASE /NXCOMPAT C:\Qt\4.7.0_static\lib\QtCored.lib kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ".\debug\main.obj" ".\debug\IncrementalTest.exe.embed.manifest.res" /NOLOGO /ERRORREPORT:PROMPT