How do I change the build output directory in QT Creator?

16,176

Solution 1

I was having a permissions problem and Qt was unable to run the compiled program in my windows partition so I had to change the build path to run in Linux, to do this I edited the {projectName}.pro.user located in the project folder and changed the following variable(s) which may vary depending on you project settings):

<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/new/path</value>

this value will belong to one specific target (release or debug) just see where tag belongs to.

Solution 2

You can also do it directly from inside QtCreator. Go to Projects | Build & Run | Build | General | Build Directory. When you enter a new directory path, the text will turn red - indicating that the directory the as yet unmade output build will be in does not exist yet. When you build the project, however, it will turn black again.

Share:
16,176

Related videos on Youtube

Nick Bolton
Author by

Nick Bolton

Hello, I'm the CEO of Symless, the company behind Synergy, software that lets you share one mouse and keyboard between multiple computers.

Updated on April 25, 2022

Comments

  • Nick Bolton
    Nick Bolton about 2 years

    I'm trying to change the build output directory in QT Creator (i.e. instead of outputting to ./debug, I want to output to ../../bin/debug). I've tried to edit the build output directory via the Projects mode, but it's read only. Looking at the .pro file doesn't seem to have anything obvious for me to edit.

  • hanetzer
    hanetzer almost 10 years
    Many thanks, I was having hell! First off, finding where the heck the built binaries ended up, second off, figuring out how to change the location (they were getting stuck in an ugly long folder in my $HOME)