Cannot change build directory!
I am trying to move my build directory to outside of my project. (I don't want to version control my build files and for whatever reason, I can't simply ignore the build files.)
I tried changing the Default Build Directory in Options>Build & Run. I can successfully change this directory but the build files are still created in the project folder (not the directory I specified.)
Next I tried changing the debug and release build paths in the ProjectName.pro.user file. I save these changes and rebuild. The files are AGAIN created in the project folder (not the directory I specified.)
What's worse is that if I save these changes to the user file and close the project, then re-open it. The build locations in the user file are CHANGED BACK to directory I DO NOT want them in.
This is incredibly frustrating. Any suggestions?
Note: I am deleting the build files in between trying. They are completely generated from scratch in the location I do not want.
Hi and welcome to devnet,
Did you enable shadow build when configuring your project the first time ?
Also what version of Qt/Qt Creator/OS are you running ?
Qt Creator 5.2.1
And not sure about shadow building. Not even sure what it is. How do I check if it is enabled?
Shadow building is a technique used to build different Qt builds of the same version for different platforms/compilers/etc. Your compiled build is in a different directory, separate from the original Qt source directory.
I've created a shadow build for my MSVS2010 compiler. If I wanted to, I could create a new build for MinGW in a different build directory.
I should mention that nothing is created in the directory I specified. It is completely untouched and the build files are generated in the location I do not want them at.
It should be enabled by default when first configuring your project.
In the Project panel, Build Settings under General you should have a checkbox with that option.
Shadow building is exactly what you want "outside the source build".
That did it! Thanks so much!
@SGaist I use Qt Creator 5.6.0 on KUbuntu 16.04. I'm facing the same problem. Can you tell me which option should have checkbox in Tools->Options->Build&Run-> General ?
@Swati Is it this what you're looking for?
@Wieland Yeah. Problem solved now.
Thank you so much! :)
@Swati Glad you solved it eventually! These little things can make one crazy :-)
@Wieland Yeah right! :D