wrong file linking after duplicating project



  • Hey,
    i dublicated a project (dublicated the folder in explorer and renamed the files, surely not the best way, I know) and when I now compile the old project, it tries to take the mainwindow.cpp from the newer project...
    How can I fix this?
    Thanks for answers


  • Moderators

    @Niagarer

    By this little information you are giving the only reply can be

    • Use relative path' for files within your project files

    Otherwise you probably need to share information on your file structures (old and new) and post some .pro and .pri files, which you have manually manipulated.



  • @koahnig
    Ok.
    I had a Project let's call it myPro_2. Then I wanted to duplicate it to keep an old version. So, as I wrote, I duplicated the folder in the explorer (so now I have one folder named myProject_2, which is the old one and one folder named myProject_3 which is the newer one). In the folder myProject_3 I changed the file myProject_2.pro to myProject_3.pro and the file myProject_2.pro.user to myProject_3.pro.user . The problem now is, that my old project tries to use the mainwindow.cpp by the new one.
    Run qmake doesn't help yet.
    One thing that I forgot to change was setting the target in myProject_3.pro to myProject_3 (it was still myProject_2)
    But changing it, running qmake and rebuild it all doesn't help...
    Need something else?



  • SOLVED
    Under Projects (left margin) -> (don't forget here to select the right project here) Build -> General -> Build directory: and here just changing the directory to a new one
    Make sure, that in Run (under Build) the directories also have changed.
    Then qmake, build and run.


Log in to reply
 

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