Reputation: 182
Im new to C++ developing and can't get Code::Blocks to compile correctly. It exits with
Process terminated with status -1
The program is a very basic 'Hello World' program.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
To set up my environment, I followed this guide step by step: http://www.dummies.com/programming/cpp/how-to-install-c-codeblocks-in-ubuntu-linux/
Also researching the error:
Process terminated with status -1
with google, does not give me the expected answer.
Any idea what could be wrong or need more information from me?
best wishes and thanks.
Solution:
In my case, xterm was not installed. after getting xterm with
sudo apt-get install xterm
everything works fine.
Thanks
Upvotes: 2
Views: 1151
Reputation: 11
I am running C::B on Linux Mint and I had the same problem. The "problem" is that C::B uses xterm as it's default terminal. However, Mint 19 uses gnome by default, not xterm. You don't have to install xterm for C::B to work. First go to Settings >> Environment. In C::B v16.01, at the bottom of the menu that opened there is a line and it's associated drop-down menu: Terminal to launch console programs:. In the drop-down menu select gnome (or other any other compiler that you use on your system) and it should work, rebuild and run!
Upvotes: 1