1

I'm trying to run some C programs using Geany and Code::Blocks. After coding them, when I run them, a message is showed in the terminal like this:

In Code::Blocks:

sh: 1: /home/c program files/2: not found. "process returned 127 (0x7F)"

In Geany:

"./geany run script.sh./2: not found.
( program excited with code 127)"

While compiling the program using Code::Blocks, it shows:

/bin/sh: 1: g++ : not found.

I don't know what to do now.

1
  • Is it a C program, or a C++ program? if C++, you will need to install a C++ compiler (the default one being g++) as indicated by the error message. – steeldriver Apr 2 '15 at 0:23
3

Are you running Code::Blocks and or Geany in Wine? I ask because C program files isn't a usual Linux directory.

First, install g++ Install g++:

sudo apt-get install g++

Next:

  • In Geany Compiling and running goes like this:
    Compile: click this button:enter image description here

  • Build:
    Click this button:enter image description here

I think what is happening in Geany is that you are "compiling" which checks your code for errors, but not building, which creates the output file you are trying to execute.

If Code::Blocks doesn't work after installing g++ Install g++, post back and I'll investigate that.

1
  • 1
    after installing g++, it worked ! Many many Thnx ! – Mr. Tripple M. Apr 2 '15 at 3:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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