Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QtCreator returns error "Cannot change to working directory"

I'm trying to running a simple HelloWorld program with Qt Creator Code:

#include <iostream>

using namespace std;

int main()
{
  cout << "Hello World!" << endl;
  return 0;
}

When running occurs the error

Cannot change to working directory '/home/myusername/build-myproject-Desktop-Debug': file or directory not found

Many tutorials in the internet tell me to disable "Run in terminal", but I need this for my project. My working directory is /home/myusername/build-myproject-Desktop-Debug

Any help?

like image 863
PEAR Avatar asked Jun 07 '14 12:06

PEAR


2 Answers

You can install Terminator terminal (sudo apt-get install terminator) and use it as Qt Creator terminal:

Tools->Options->Enviroment->System->Terminal->"/usr/bin/terminator -x"

like image 40
Carlos Trujillo Avatar answered Nov 09 '22 11:11

Carlos Trujillo


Which OS are you running?

I'm on Linux and had the same problem. My solution was to use xterm and set the default Terminal in Qtcreator to xterm (In the menu: Tools, then Options, then Environment, then Terminal, there "/usr/bin/xterm -e")

like image 163
user3717781 Avatar answered Nov 09 '22 10:11

user3717781