Code::Blocks 13.12 Process terminated with status -1 (0 minute(s), 0 second(s) )

Solution 1:

Make sure that you have g++ and xterm installed. Open the terminal and type:

sudo apt-get install g++ xterm   

Now in Settings -> Compiler -> Toolchain executables tab -> C++ compiler there should be g++ If g++ isn't there, then closing and reopening Code::Blocks should put it there after where it says C++ compiler:.

Before you run your code, which should run successfully, select File -> New -> Project -> Console application -> C++ and continue until the end of the wizard. Then select Build -> Build to build it and click the green triangle run icon to run the program.

A new XTerm window will open with the following results:

Hello world! 

Process returned 0 (0x0)  execution time : 0.002 s
Press ENTER to continue.