I have a project in Visual 2005 generated using CMake, and everytime I press F5 the linker relinks the objects, even if no modification was done. I have read other questions with similar problems, but the solution for them was:
-
The time of the windows was wrong. It was making the executable to be created with the time in the future. Or
-
The PDB created by the linker and by the compiler had the same name.
I’ve checked that and I don’t have that problem. Also, I have another solution for the project (that was not generated by CMake) and it works fine. I’ve checked the properties of each project and they are similar.
This is the output generated in the BuildLog.htm:
Build Log
Build started: Project: remote4, Configuration: TTecDebug|Win32
Command Lines
Creating temporary file
“c:\advtec9\trunk\bin_sem_unittest\remote4\remote4.dir\TTecDebug\RSP00008649325832.rsp”
with contents [
/OUT:”c:\T\bin\smartclient\TTecDebug..\TSmartClient.exe” /VERSION:0.0
/LIBPATH:”C:\Qt4\lib\TTecDebug” /LIBPATH:”C:\Qt4\lib”
/LIBPATH:”C:\Qt4\plugins\imageformats\TTecDebug”
/LIBPATH:”C:\Qt4\plugins\imageformats”
/LIBPATH:”C:\Qt4\plugins\accessible\TTecDebug”
/LIBPATH:”C:\Qt4\plugins\accessible”
/LIBPATH:”C:\kdchart4\lib\TTecDebug” /LIBPATH:”C:\kdchart4\lib”
/MANIFEST:NO /NODEFAULTLIB:”LIBCMT” /DEBUG
/PDB:”c:\T\bin\smartclient\TTecDebug/../TSmartClient.pdb”
/SUBSYSTEM:WINDOWS
/IMPLIB:”c:\T\bin\smartclient\TTecDebug..\TSmartClient.lib”
/machine:X86 /ignore:4217 /ignore:4049 /debug
/LIBPATH:C:/advtec9/trunk/openssl/debug kdchartd.lib qtmaind.lib
QtCored.lib QtGuid.lib Qt3Supportd.lib QtXmld.lib qtsvgd.lib
QtNetworkd.lib QAxServerd.lib QAxContainerd.lib qgifd.lib qjpegd.lib
qtaccessiblecompatwidgetsd.lib qtaccessiblewidgetsd.lib
C:/advtec9/trunk/senhap/splogin4d.lib kernel32.lib user32.lib
gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
comdlg32.lib advapi32.lib ssleay32.lib libeay32.lib mpr.lib imm32.lib
winmm.lib ws2_32.lib msimg32.lib odbc32.lib odbccp32.lib
..\lib_comm\TTecDebug\lib_comm.lib
..\lib_getsys\TTecDebug\lib_getsys.lib
c:\T\bin\smartclient\TTecDebug..\singlesign.lib
..\lib_graphicprint\TTecDebug\lib_graphicprint.lib
..\lib\TTecDebug\lib.lib ..\lib_base\TTecDebug\lib_base.lib
..\lib_gzip\TTecDebug\lib_gzip.lib ..\web\TTecDebug\web.lib
..\third_libraries\engine_pkcs11\TTecDebug\engine_pkcs11.lib
..\third_libraries\libp11\TTecDebug\libp11.lib dbghelp.lib“.\remote4.dir\TTecDebug\main.obj”
“.\remote4.dir\TTecDebug\apcombase.obj”
“.\remote4.dir\TTecDebug\apexcel.obj”
“.\remote4.dir\TTecDebug\approject.obj”
“.\remote4.dir\TTecDebug\apword.obj”
“.\remote4.dir\TTecDebug\calc.obj”
“.\remote4.dir\TTecDebug\calend4.obj”
“.\remote4.dir\TTecDebug\config_client.obj”
“.\remote4.dir\TTecDebug\execinclient.obj”
“.\remote4.dir\TTecDebug\fjs_comps_base.obj”
“.\remote4.dir\TTecDebug\t4jsaction.obj”
“.\remote4.dir\TTecDebug\t4jsapplication.obj”
“.\remote4.dir\TTecDebug\t4jsbitmap.obj”
“.\remote4.dir\TTecDebug\t4jsdisplay.obj”
“.\remote4.dir\TTecDebug\t4jsdisplayarray.obj”
“.\remote4.dir\TTecDebug\t4jsexpandedinput.obj”
“.\remote4.dir\TTecDebug\t4jsform.obj”
“.\remote4.dir\TTecDebug\t4jshelpwindow.obj”
“.\remote4.dir\TTecDebug\t4jsinput.obj”
“.\remote4.dir\TTecDebug\t4jsinputarray.obj”
“.\remote4.dir\TTecDebug\t4jsinputcheck.obj”
“.\remote4.dir\TTecDebug\t4jsinputfieldbmp.obj”
“.\remote4.dir\TTecDebug\t4jsinputimage.obj”
“.\remote4.dir\TTecDebug\t4jsinputradio.obj”
“.\remote4.dir\TTecDebug\t4jsinputtext.obj”
“.\remote4.dir\TTecDebug\t4jsmainwindow.obj”
“.\remote4.dir\TTecDebug\t4jsmenu.obj”
“.\remote4.dir\TTecDebug\t4jsmessagebox.obj”
“.\remote4.dir\TTecDebug\t4jsmultilineinputtext.obj”
“.\remote4.dir\TTecDebug\t4jspromptinput.obj”
“.\remote4.dir\TTecDebug\t4jstoolbar.obj”
“.\remote4.dir\TTecDebug\t4jswaitwindow.obj”
“.\remote4.dir\TTecDebug\t4jswindow.obj”
“.\remote4.dir\TTecDebug\qtcolortriangle.obj”
“.\remote4.dir\TTecDebug\qtsingleapplication.obj”
“.\remote4.dir\TTecDebug\remote_utils.obj”
“.\remote4.dir\TTecDebug\rmtcli.obj”
“.\remote4.dir\TTecDebug\signfunctions.obj”
“.\remote4.dir\TTecDebug\talignlayout.obj”
“.\remote4.dir\TTecDebug\tapplication.obj”
“.\remote4.dir\TTecDebug\tbitmap.obj”
“.\remote4.dir\TTecDebug\tbrowsebutton.obj”
“.\remote4.dir\TTecDebug\tbtnbmp.obj”
“.\remote4.dir\TTecDebug\tbutton.obj”
“.\remote4.dir\TTecDebug\crazychrs.obj”
“.\remote4.dir\TTecDebug\parserext.obj”
“.\remote4.dir\TTecDebug\Tprinter.obj”
“.\remote4.dir\TTecDebug\Tprinterfonts.obj”
“.\remote4.dir\TTecDebug\ttpviewer.obj”
“.\remote4.dir\TTecDebug\tcbrowse.obj”
“.\remote4.dir\TTecDebug\tchartwin.obj”
“.\remote4.dir\TTecDebug\tcheckbox.obj”
“.\remote4.dir\TTecDebug\tcombobox.obj”
“.\remote4.dir\TTecDebug\tcomponentfactory.obj”
“.\remote4.dir\TTecDebug\tconnection.obj”
“.\remote4.dir\TTecDebug\tconnectionsocket.obj”
“.\remote4.dir\TTecDebug\tcontrol.obj”
“.\remote4.dir\TTecDebug\tcorretor.obj”
“.\remote4.dir\TTecDebug\tcreateinifiledialog.obj”
“.\remote4.dir\TTecDebug\tdgcanvas.obj”
“.\remote4.dir\TTecDebug\tdgcanvasitem.obj”
“.\remote4.dir\TTecDebug\tdgcanvasview.obj”
“.\remote4.dir\TTecDebug\tdgconnectorabs.obj”
“.\remote4.dir\TTecDebug\tdgconnectorline.obj”
“.\remote4.dir\TTecDebug\tdgconnectorpoly.obj”
“.\remote4.dir\TTecDebug\tdgdocument.obj”
“.\remote4.dir\TTecDebug\tdgeditor.obj”
“.\remote4.dir\TTecDebug\tdgrule.obj”
“.\remote4.dir\TTecDebug\tdgselectionbox.obj”
“.\remote4.dir\TTecDebug\tdgshape.obj”
“.\remote4.dir\TTecDebug\tdgshapeabs.obj”
“.\remote4.dir\TTecDebug\tdgshapebox.obj”
“.\remote4.dir\TTecDebug\tdgshapeicon.obj”
“.\remote4.dir\TTecDebug\tdgundolog.obj”
“.\remote4.dir\TTecDebug\tdgviewer.obj”
“.\remote4.dir\TTecDebug\tdialog.obj”
“.\remote4.dir\TTecDebug\teventbuffer.obj”
“.\remote4.dir\TTecDebug\tfileman.obj”
“.\remote4.dir\TTecDebug\tfolder.obj”
“.\remote4.dir\TTecDebug\tget.obj”
“.\remote4.dir\TTecDebug\tgetdados.obj”
“.\remote4.dir\TTecDebug\tgraphicprint_client.obj”
“.\remote4.dir\TTecDebug\tgroupbox.obj”
“.\remote4.dir\TTecDebug\tguicommand.obj”
“.\remote4.dir\TTecDebug\thelpbaloon.obj”
“.\remote4.dir\TTecDebug\thelpdialog.obj”
“.\remote4.dir\TTecDebug\thotkeys.obj”
“.\remote4.dir\TTecDebug\tibrowser.obj”
“.\remote4.dir\TTecDebug\tinifile_client.obj”
“.\remote4.dir\TTecDebug\tlibmanager.obj”
“.\remote4.dir\TTecDebug\tlistbox.obj”
“.\remote4.dir\TTecDebug\tlocallog.obj”
“.\remote4.dir\TTecDebug\tmenu.obj”
“.\remote4.dir\TTecDebug\tmenubar.obj”
“.\remote4.dir\TTecDebug\tmenupopup.obj”
“.\remote4.dir\TTecDebug\tmessage.obj”
“.\remote4.dir\TTecDebug\tmessagebar.obj”
“.\remote4.dir\TTecDebug\tmessagebox.obj”
“.\remote4.dir\TTecDebug\tmessagehook.obj”
“.\remote4.dir\TTecDebug\tmeter.obj”
“.\remote4.dir\TTecDebug\tmodaldialog.obj”
“.\remote4.dir\TTecDebug\tmscalendar.obj”
“.\remote4.dir\TTecDebug\tmscalendgrid.obj”
“.\remote4.dir\TTecDebug\tmsgrun.obj”
“.\remote4.dir\TTecDebug\tmsselbr.obj”
“.\remote4.dir\TTecDebug\tmultiget.obj”
“.\remote4.dir\TTecDebug\tnanfor.obj”
“.\remote4.dir\TTecDebug\tobjecthook.obj”
“.\remote4.dir\TTecDebug\tolecontainer.obj”
“.\remote4.dir\TTecDebug\tpageview.obj”
“.\remote4.dir\TTecDebug\tpanel.obj”
“.\remote4.dir\TTecDebug\tparametersform.obj”
“.\remote4.dir\TTecDebug\tprinterhook.obj”
“.\remote4.dir\TTecDebug\tprinterspool.obj”
“.\remote4.dir\TTecDebug\tradiobutton.obj”
“.\remote4.dir\TTecDebug\trashook.obj”
“.\remote4.dir\TTecDebug\tremoteopensave.obj”
“.\remote4.dir\TTecDebug\treportprinter.obj”
“.\remote4.dir\TTecDebug\tresourcemanager.obj”
“.\remote4.dir\TTecDebug\tsay.obj”
“.\remote4.dir\TTecDebug\tsbutton.obj”
“.\remote4.dir\TTecDebug\tscrollbox.obj”
“.\remote4.dir\TTecDebug\tsplash.obj”
“.\remote4.dir\TTecDebug\ttab.obj”
“.\remote4.dir\TTecDebug\tterminal.obj”
“.\remote4.dir\TTecDebug\tterminalupd.obj”
“.\remote4.dir\TTecDebug\ttimer.obj”
“.\remote4.dir\TTecDebug\ttoolbar.obj”
“.\remote4.dir\TTecDebug\ttree.obj”
“.\remote4.dir\TTecDebug\tvalue.obj”
“.\remote4.dir\TTecDebug\tverticalscrollbar.obj”
“.\remote4.dir\TTecDebug\twindow.obj”
“.\remote4.dir\TTecDebug\tworkspace.obj”
“.\remote4.dir\TTecDebug\tworkspacefolder.obj”
“.\remote4.dir\TTecDebug\tworktime.obj”
“.\remote4.dir\TTecDebug\waitrun.obj”
“.\remote4.dir\TTecDebug\tgrid.obj”
“.\remote4.dir\TTecDebug\httpclient.obj”
“.\remote4.dir\TTecDebug\tpaintpanel.obj”
“.\remote4.dir\TTecDebug\ttimerhook.obj”
“.\remote4.dir\TTecDebug\qtsingleapplication_win.obj”
“.\remote4.dir\TTecDebug\rational_robot.obj”
“.\remote4.dir\TTecDebug\remote41.res”
“.\remote4.dir\TTecDebug\qrc_remote4.obj”
“.\remote4.dir\TTecDebug\moc_calc.obj”
“.\remote4.dir\TTecDebug\moc_calend4.obj”
“.\remote4.dir\TTecDebug\moc_t4jsaction.obj”
“.\remote4.dir\TTecDebug\moc_t4jsapplication.obj”
“.\remote4.dir\TTecDebug\moc_t4jsdisplayarray.obj”
“.\remote4.dir\TTecDebug\moc_t4jsexpandedinput.obj”
“.\remote4.dir\TTecDebug\moc_t4jsform.obj”
“.\remote4.dir\TTecDebug\moc_t4jshelpwindow.obj”
“.\remote4.dir\TTecDebug\moc_t4jsinput.obj”
“.\remote4.dir\TTecDebug\moc_t4jsinputarray.obj”
“.\remote4.dir\TTecDebug\moc_t4jsinputcheck.obj”
“.\remote4.dir\TTecDebug\moc_t4jsinputfieldbmp.obj”
“.\remote4.dir\TTecDebug\moc_t4jsinputimage.obj”
“.\remote4.dir\TTecDebug\moc_t4jsinputradio.obj”
“.\remote4.dir\TTecDebug\moc_t4jsinputtext.obj”
“.\remote4.dir\TTecDebug\moc_t4jsmainwindow.obj”
“.\remote4.dir\TTecDebug\moc_t4jsmenu.obj”
“.\remote4.dir\TTecDebug\moc_t4jsmessagebox.obj”
“.\remote4.dir\TTecDebug\moc_t4jsmultilineinputtext.obj”
“.\remote4.dir\TTecDebug\moc_t4jspromptinput.obj”
“.\remote4.dir\TTecDebug\moc_t4jstoolbar.obj”
“.\remote4.dir\TTecDebug\moc_t4jswindow.obj”
“.\remote4.dir\TTecDebug\moc_qtcolortriangle.obj”
“.\remote4.dir\TTecDebug\moc_qtsingleapplication.obj”
“.\remote4.dir\TTecDebug\moc_talignlayout.obj”
“.\remote4.dir\TTecDebug\moc_tapplication.obj”
“.\remote4.dir\TTecDebug\moc_tbitmap.obj”
“.\remote4.dir\TTecDebug\moc_tbtnbmp.obj”
“.\remote4.dir\TTecDebug\moc_tbutton.obj”
“.\remote4.dir\TTecDebug\moc_Tprinter.obj”
“.\remote4.dir\TTecDebug\moc_tcbrowse.obj”
“.\remote4.dir\TTecDebug\moc_tchartwin.obj”
“.\remote4.dir\TTecDebug\moc_tcheckbox.obj”
“.\remote4.dir\TTecDebug\moc_tcombobox.obj”
“.\remote4.dir\TTecDebug\moc_tcontrol.obj”
“.\remote4.dir\TTecDebug\moc_tcorretor.obj”
“.\remote4.dir\TTecDebug\moc_tcreateinifiledialog.obj”
“.\remote4.dir\TTecDebug\moc_tdgcanvasview.obj”
“.\remote4.dir\TTecDebug\moc_tdgconnectorline.obj”
“.\remote4.dir\TTecDebug\moc_tdgdocument.obj”
“.\remote4.dir\TTecDebug\moc_tdgeditor.obj”
“.\remote4.dir\TTecDebug\moc_tdgrule.obj”
“.\remote4.dir\TTecDebug\moc_tdgshape.obj”
“.\remote4.dir\TTecDebug\moc_tdgshapebox.obj”
“.\remote4.dir\TTecDebug\moc_tdgshapeicon.obj”
“.\remote4.dir\TTecDebug\moc_tdgviewer.obj”
“.\remote4.dir\TTecDebug\moc_tdialog.obj”
“.\remote4.dir\TTecDebug\moc_tfolder.obj”
“.\remote4.dir\TTecDebug\moc_tget.obj”
“.\remote4.dir\TTecDebug\moc_tgetdados.obj”
“.\remote4.dir\TTecDebug\moc_tguicommand.obj”
“.\remote4.dir\TTecDebug\moc_thelpbaloon.obj”
“.\remote4.dir\TTecDebug\moc_thelpdialog.obj”
“.\remote4.dir\TTecDebug\moc_tlistbox.obj”
“.\remote4.dir\TTecDebug\moc_tmenu.obj”
“.\remote4.dir\TTecDebug\moc_tmenupopup.obj”
“.\remote4.dir\TTecDebug\moc_tmessagebar.obj”
“.\remote4.dir\TTecDebug\moc_tmessagebox.obj”
“.\remote4.dir\TTecDebug\moc_tmodaldialog.obj”
“.\remote4.dir\TTecDebug\moc_tmscalendar.obj”
“.\remote4.dir\TTecDebug\moc_tmscalendgrid.obj”
“.\remote4.dir\TTecDebug\moc_tmsselbr.obj”
“.\remote4.dir\TTecDebug\moc_tmultiget.obj”
“.\remote4.dir\TTecDebug\moc_tobjecthook.obj”
“.\remote4.dir\TTecDebug\moc_tolecontainer.obj”
“.\remote4.dir\TTecDebug\moc_tpageview.obj”
“.\remote4.dir\TTecDebug\moc_tpanel.obj”
“.\remote4.dir\TTecDebug\moc_tparametersform.obj”
“.\remote4.dir\TTecDebug\moc_tprinterhook.obj”
“.\remote4.dir\TTecDebug\moc_tprinterspool.obj”
“.\remote4.dir\TTecDebug\moc_tradiobutton.obj”
“.\remote4.dir\TTecDebug\moc_tremoteopensave.obj”
“.\remote4.dir\TTecDebug\moc_treportprinter.obj”
“.\remote4.dir\TTecDebug\moc_tresourcemanager.obj”
“.\remote4.dir\TTecDebug\moc_tsay.obj”
“.\remote4.dir\TTecDebug\moc_tscrollbox.obj”
“.\remote4.dir\TTecDebug\moc_ttab.obj”
“.\remote4.dir\TTecDebug\moc_tterminal.obj”
“.\remote4.dir\TTecDebug\moc_ttoolbar.obj”
“.\remote4.dir\TTecDebug\moc_ttree.obj”
“.\remote4.dir\TTecDebug\moc_tverticalscrollbar.obj”
“.\remote4.dir\TTecDebug\moc_twindow.obj”
“.\remote4.dir\TTecDebug\moc_tworkspace.obj”
“.\remote4.dir\TTecDebug\moc_tworkspacefolder.obj”
“.\remote4.dir\TTecDebug\moc_tworktime.obj”
“.\remote4.dir\TTecDebug\moc_tgrid.obj”
“.\remote4.dir\TTecDebug\moc_httpclient.obj”
“.\remote4.dir\TTecDebug\moc_tpaintpanel.obj”
“.\remote4.dir\TTecDebug\moc_ttimerhook.obj”
“.\remote4.dir\TTecDebug\moc_splogin.obj” ] Creating command line
“link.exe
@c:\advtec9\trunk\bin_sem_unittest\remote4\remote4.dir\TTecDebug\RSP00008649325832.rsp
/NOLOGO /ERRORREPORT:PROMPT”Output Window
Linking…
Results
Build log was saved at
“file://c:\advtec9\trunk\bin_sem_unittest\remote4\remote4.dir\TTecDebug\BuildLog.htm”
remote4 – 0 error(s), 0 warning(s)
I’ve (finally!) found out what my problem was.
I have a project with some sub-directories. In the CMakeLists.txt of each subdirectory, I was defining a project name (with the command
project()). This was causing visual studio to behave like that.When I removed the
project()of the sub_directories the problem was solved.