codeblocks doesn't show console

that is standard hello world program linux mint last stable version


-------------- Build: Debug in prj1 (compiler: GNU GCC Compiler)---------------

Target is up to date.
Nothing to be done (all items are up-to-date).


-------------- Run: Debug in prj1 (compiler: GNU GCC Compiler)---------------

Checking for existence: /home/miloserdniy/prj1/bin/Debug/prj1
Executing: xterm -T prj1 -e /usr/bin/cb_console_runner LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. /home/miloserdniy/prj1/bin/Debug/prj1 (in /home/miloserdniy/prj1/.)
Process terminated with status -1 (0 minute(s), 0 second(s))

#include <iostream>
#include <stdio.h>

using namespace std;

int main()
{
cout << "Hello world!!!";
cin.get();
cin.get();
cin.get();
return 0;
}
Last edited on
Is prj1 the name of the executable?

It looks like your program is running, but it immediately ends with a return code of -1.

You said it's hello world, but can we see the exact code?

Also, I don't know if the following directions are 100% accurate, but please try them:
- go to project properties.
- click on build targets
- there is an option below console application "pause when execution ends"
Last edited on
the same problem
You also either need to make sure the program "xterm" is actually installed on your computer, or change the name of the executable (xterm) to some other terminal program.

Edit: What operating system are you using? And what version is the OS?
Last edited on
mint 19.3
http://forums.codeblocks.org/index.php?topic=23213.0
stahta01 wrote:
If it builds OK; but, does not run the problem on Linux is normally you failed to install the terminal program or need to configure Code::Blocks to use the terminal program that is installed.
Maybe xterm is the issue, like jlb said.

Is the default terminal on Mint gnome-terminal? Maybe try that?
Last edited on
thanks for help. xterm installation worked fine
Last edited on
Since Mint doesn't automatically install xterm, I normally just take the minute or two to download and install the xterm package, then there is no need to mess with the command line arguments to setup the environment.

Registered users can post here. Sign in or register to post.