I'm new to Code:Blocks IDE. I'm running MXLinux.
After following Code:Block instructions for a first program, no console appeared when I ran the built program.
I had no clue what the error message meant. I'd never heard of xterm as a program nor any command named by that name.
Incorrectly I guessed, xterm must be a part of CodeBlocks program.
Much later, I finally read a post "Works fine here with gnome-terminal." That is when the bell finally went off since I'd heard of that.
My system runs xfce terminal. Therefore, xterm must be a terminal.
So for anyone as mentally handicapped as I am, here's what worked for me.
Determine the name of the terminal program your system uses. (for old window users this is something like a dos box).
Go back to Code::blocks program. Select "Settings" --> "Environment..." Select "General Settings " (colored icon on left).
Near the bottom of that screen, in the text box labeled: "terminal to launch console programs"
use the "arrow down" on the right side to replace xterm with the terminal program on your system. Then hit OK.