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?


  • Qt Champions 2016

    @nulluse
    Rerunning qmake will 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 qmake but nothing has changed. It was fixed after I deleted the makefiles on the command line though.


  • Qt Champions 2016

    @nulluse
    That'd be strange. Running qmake overwrites the makefiles for me and always had, I've never faced such issue ...


  • Qt Champions 2016

    Very strange indeed
    I have my projects in dropbox so at work its
    c:\dropbox\xxx
    and at home
    its
    f:\dropbox\xxx
    And running qmake+rebuild all
    have so far function perfectly.



  • Hi ,
    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).

    1. 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.
    2. After deleting .pro.user file try to open the project in Qt creator ,so it generates new .pro.user file according to new changes.
    3. Running qmake generates new Makefile according to new location .

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.