[Qt-interest] vs2005 / vs2008 / 4.5.2 continually rebuilds project
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Mon Jul 6 09:46:25 CEST 2009
Peter Lee wrote on Friday, July 03, 2009 5:55 PM:
> Sorry for the lack of details... it's late here! ;-)
>
> Our projects compile and link fine. If we compile and run, and then
> try to run again - the projects get rebuilt completely. Same if we
> compile, change nothing, and compile again. If we change one file -
> then also - then whole lot gets done. Everything is getting
> re-moced.
>
> I've just reinstalled 4.5.0 - and it's working fine. I've just
Hmmm, that's really strange. Right now I could think of only one reason why a new version of a library (and its headers) would cause Visual Studio to re-compile the whole project each time from scratch, and that is the time-stamp of the Qt library/headers, which might be set "in the future" (for whatever reasons).
So each time Visual Studio would think that the Qt headers have changed and would hence trigger a recompile of the dependent files, which happen to be your source files (read: the entire project).
The solution would be to "touch" all the Qt files (don't know what the equivalent Windows command to the Unix command "touch" would be, which sets the "last access" (or was it even "last modified"?) timestamp to the current one).
Maybe there is another reason: there is a
C:\Qt\4.5.x\mkspecs\win32-msvc2008\qmake.conf
configuration file (also for win32-msvc2005 etc.) which contains the compiler switches. How did you generate your Visual Studio project files? With
qmake -t vcapp
(which generates a Visual Studio project , given a qmake *.pro file)? In this case the compiler settings in Visual Studio would be set according to that qmake.conf file. Maybe the one in Qt 4.5.2 (and I am really shooting into the blue here, I currently don't use the Qt 4.5.2...) contains compiler settings which prevent an incremental build? (But then again, that still would not explain why the project is re-compiled when you "run" it, after having it just compiled - that actually hints more towards "future timestamps").
> regenerated the vs2008 projects using qmake 4.5.0 and qmake 4.5.2...
> and there are some differences. The 4.5.0 file is 4184KB, the 4.5.2
> is 6287KB. Mostly the changes are just 4.5.x etc.... but in the
> "header files" section... each entry is different. I've attached a
> small example.
I've had a quick glance at it, but to be honest I don't have any explanation why that is - other than the obvious "well, something must have changed between 4.5.0 and 4.5.2" ;)
So the only real hint here I have is the timestamp issue. Sorry for not being more helpful.
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list