Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 :

./geany_run_script.sh: 5: ./geany_run_script.sh: ./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

5 Answers 5

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... bakhtiar.web.id/wp-content/uploads/… –  backids99 Apr 1 '13 at 13:33

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

In your screenshot we can see the compiling command g++ -Wall "-c", http://bakhtiar.web.id/wp-content/uploads/Screenshot%20from%202013-04-01%2013:15:02.png

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

share|improve this answer

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 loops.py

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

 
discard

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.