Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed code blocks, selected a GNU/gcc compiler, and created a new empty project and file. When I try to execute a basic Hello World program, no console window pops up and no errors are generated.

share|improve this question

Actually Codeblocks has sometime a problem like the one you mention. what I do is click on New File and select Empty File or just press Shift+Ctrl+N and then SAVE the file with some name .cpp. Like example.cpp.

THEN you start writing the code for it. When finished press F9 for it to Build and Run.

IF by any chance you do not have g++ in your Ubuntu (In my ubuntu it does not come by default) just install it by sudo apt-get install g++ or better yet the build essential tools sudo apt-get install build-essential and close and open CodeBlocks.

share|improve this answer

I had a similar issue when g++ was not installed. Codeblocks actually uses g++, not gcc. Try installing the "g++" package.

share|improve this answer

You need to install the 'build-essential' package. Open a terminal and type: sudo apt-get install build-essential You can also install it with synaptic package manager or with the ubuntu software center.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.