Important: Please read the Qt Code of Conduct -

[solved] Moved Project folder

  • Hello,

    I moved my project in an other folder, like this:

    Now I have problems with compiling.

    Can you tell me what files to update and to renew ?
    Thank you

  • Moderators

    You will need to rerun qmake, provided you use a project with a .pro-file.

    Qt Creator has an option in the Build menu, if you are using that.

  • There is already the problem when running qmake again.
    I also tried to clean the project before copying it (2 files were removed), then I copied it, but then always this is the error log:
    ! compiling)!

    Another idea idea would be creating a new project in the new folder and copying the code into the files, but I am still looking for an easier solution.

  • Now, I did the following:

    Deleting these files:

    • .make.cache
    • ABLD.BAT
    • bld.inf
    • <projectname>.loc
    • <projectname>.pro.user
    • <projectname>.rss
    • <projectname>_exe.mmp
    • <projectname>_installer.pkg
    • <projectname>_reg.rss
    • <projectname>_stub.pkg
    • <projectname>_template.pkg
    • Makefile
    • Makefile_<projectname>

    Then copying the project to the desired path and start the compiling.

    It worked ! :)

    I found out that these files should be deleted by rerunning the qmake after cleaning up the project and then looking at the date when they were changed or created.

  • If you are interested in a clean executable for the projects, here you go:


    Sorry, code disappeared for no reason ?!
    Look "here":


    Hope it helps.

  • Moderators

    "make clean" should also remove all the generated files.

    If you have your project in git (like we do with Qt Creator;-) and want to make sure to have no more files around that git does not know about you can do "git clean -fdx", too.

  • Hello,

    I also tried clean via build's menu but only 2 files were removed.
    The files I mentioned above, are they removed when you run clean ? Then something is wrong with my SDK?!
    However, the solution I wrote in a batch script should do this, too; whereby clicking a context popupmenu's entry would be even nicer ;)

  • Moderators

    You can always add your script as a custom build step into your build configuration or define it as an external command (Tools->External->Configure), which can than get triggered via the UI.

  • Thank you very much, this is great!
    I also needed something like this for other tasks but I didn't find it so I thought it was not possible, I also found out that project's varialbes can be passed like, for me very important, the project filepath.

  • If anyone is interested, I will translate my command line application into english and upload it.

Log in to reply