Project's exe not being rebuilt when a dependant .lib is updated.
-
I have a gui application project that comprises of 3 subdirs projects containing .lib files. When I update any of the .lib project's sources and do a ^r or ^b the changes are compiled but the .exe is never updated to reflect this.
According to Creator's Projects tab all of the dependencies are set. I added a qDebug() << "Boo" ; into one of the libraries sources and did a ^r to build and run. But I never saw the output, so I tweaked one of the application's source files and again did a ^r and this time the text appeared in the console!
I guess I must be missing something but I can't see what or where it is, anyone got any ideas?
P.S. ^ = Ctrl key
-
I haven't used Creator's dependency settings myself, but perhaps it also needs one of these:
http://doc.qt.nokia.com/latest/qmake-variable-reference.html#pre-targetdeps
http://doc.qt.nokia.com/latest/qmake-environment-reference.html#library-dependencies
-
Hi Bradley,
The PRE_TARGETDEPS option had no obvious effect on the build process, so I thought I would try the second suggestion, but this resulted in a broken build:
@
...
jom 1.0.5 - empower your coresipo: error #11018: Cannot open Files
ipo: error #11018: Cannot open (x86)/Intel/ComposerXE-2011/ipp/lib/intel64
ipo: error #11018: Cannot open C:/Program
ipo: error #11018: Cannot open Files
ipo: error #11018: Cannot open (x86)/Intel/ComposerXE-2011/ipp/lib/intel64\ippcore.lib
ipo: error #11018: Cannot open C:/Program
ipo: error #11018: Cannot open Files
ipo: error #11018: Cannot open (x86)/Intel/ComposerXE-2011/ipp/lib/intel64\ippcp.lib
ipo: error #11018: Cannot open Files
ipo: error #11018: Cannot open (x86)/Intel/ComposerXE-2011/compiler/lib/intel64
ipo: error #11018: Cannot open Files
ipo: error #11018: Cannot open (x86)/Intel/ComposerXE-2011/ipp/lib/intel64
ipo: error #11018: Cannot open C:/Program
ipo: error #11018: Cannot open (x86)/Intel/ComposerXE-2011/ipp/lib/intel64\ippcore.lib
ipo: error #11018: Cannot open (x86)/Intel/ComposerXE-2011/ipp/lib/intel64\ippcp.lib
LINK : fatal error LNK1181: cannot open input file 'Files.obj'
xilink: executing 'link'
command failed with exit code 1181
The process "C:\Qt\qtcreator-2.1.0\bin\jom.exe" exited with code 2.
Error while building project monitor (target: Desktop)
When executing build step 'Make'@Quite odd.
-
Well that's exactly what I thought, so I changed the file to ensure all paths containing spaces were quoted, and that all paths used forward slashes, but I still got the same error, even after closing and re-opening the session in case the prl files were cached in memory.
When setting my target deps I tried with both = and += followed by the name of my libraries I even tried $(SUBDIRS) as well, but I still didn't get a rebuild of the main executable with any of the methods I tried!
So in a nutshell when I add a qDebug() line to one of my sub project libraries and Run the project the changes are detected and the library is rebuilt. However this library is never re-linked with the exe and I don't see my qDebug() output. I will only ever see it if I make a change to the exe's source to force a rebuild or do a manual rebuilt from the menu.