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 want run C++ in Geany, but I got a problem. Before I run Pascal but cannot run. Then I installed fpc success run fine. And I run C++, appear error in terminal :

./ 5: ./ ./untitled: not found

(program exited with code: 127)
Press return to continue

I wanted to ask, how to run the C++ in Geany? Is there any additional plugin for my problem? Please help me.

share|improve this question

You didn't build the file, you just compiled it.

In your screenshot we can see the compiling command g++ -Wall "-c",

which means "Compile and assemble, but do not link".

share|improve this answer

I could only reproduce this error if the program didn't compile successfully OR you did not build it after compiling it. If you've compiled+built it, it's likely that there's an error in your program, which means that untitled.cpp did not compile down to the corresponding binary untitled, thus raising the ./untitled: not found error.

Always check the compiler output to see if compilation was successful. You can find it below the code-area. See:

I added an error to reproduce your problem

Try running a simple Hello World C++ program and check to see if it works.

#include <iostream>

int main() {
   std::cout << "Hello, World!" << std::endl;
   return 0;
share|improve this answer
I've tried to compile and success. But the error message appears on the terminal. See it...… – backids99 Apr 1 '13 at 13:33

Build the file in Geany as follows, you should be able to execute without any problem after that

enter image description here

share|improve this answer

I just had this problem and the answer was none of the above. I simply hadn't named the Geany file properly. When I saved it I called it loops, I should have called it

share|improve this answer

Add system("PAUSE"); to the program and then it will work fine.

Do not add getch();

share|improve this answer
Where, at the start or the end? – Braiam Dec 10 '13 at 2:05

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.