Full paths in the makefiles of a QtCreator project
Seeing how the full paths are being used in the makefiles, how can a project can be moved to another directory after it has been created, or to another machine?
Generated Makefiles are not portable, their sources are (the .pro file when using qmake). You should not move generated Makefiles at all, and neither add to your VCS.
Is there a process to clean the project of the generated makefiles?
qmakewill overwrite the make files.
I am 100% positive that after copying the project to a new location and realizing it was still looking at the source files under the old path, I ran
qmakebut nothing has changed. It was fixed after I deleted the makefiles on the command line though.
That'd be strange. Running
qmakeoverwrites the makefiles for me and always had, I've never faced such issue ...
Very strange indeed
I have my projects in dropbox so at work its
and at home
And running qmake+rebuild all
have so far function perfectly.
When QtProject what to be shifted from one location to other location (i.e., from folder X to folder Y or from machine X to machine Y).
- When a Qtproject is compiled it generates build folder with make file, .a files, .o files and a .pro.user file in Project folder. These are system and compiler dependent. After changing location delete the .pro.user file.
- After deleting .pro.user file try to open the project in Qt creator ,so it generates new .pro.user file according to new changes.
- Running qmake generates new Makefile according to new location .