-   Programming (
-   -   Unable to compile C++ programs.make:g++ command not found error.Error 127 (

PrathuD 03-15-2009 05:37 AM

Unable to compile C++ programs.make:g++ command not found error.Error 127
Hello friends,I work on Fedora 9 and I'm unable to compile my c++ program using the make in the terminal as well as in the IDE-Anjuta.
although 'make' works fine with C programs,I get an error that g++ command is not found whenever I try it with C++ programs.


[prathamesh@localhost dsl]$ make ass7_2222
g++    ass7_2222.cpp  -o ass7_2222
make: g++: Command not found
make: *** [ass7_2222] Error 127

[prathamesh@localhost ~]$ cd ~/Documents/My_Programs/SE-4/dsl
[prathamesh@localhost dsl]$ g++ ass7_2222.cpp -o ass7_2222
bash: g++: command not found

I have the latest version of make installed on my computer.

[root@localhost ~]# yum install make
Loaded plugins: refresh-packagekit
Existing lock /var/run/ another copy is running as pid 11178.
Another app is currently holding the yum lock; waiting for it to exit...
Setting up Install Process
Parsing package install arguments
Package 1:make-3.81-12.fc9.i386 already installed and latest version
Nothing to do

I,then reinstalled make.
Still I'm unable to compile C++ programs..
Would anyone please help me out???Please..

Sergei Steshenko 03-15-2009 06:20 AM

'gcc' is not the same as 'g++', and the error message clearly says:


bash: g++: command not found
So, either g++ is not installed or it's not in $PATH.

knudfl 03-15-2009 07:48 AM

  • # yum -y install gcc-c++
will provide /usr/bin/g++


PrathuD 03-16-2009 01:44 PM

thanx..It worked..
I had 'make' installed...I assumed that it would come along with g++.The man pages certainly had many entries on g++.

All times are GMT -5. The time now is 07:00 AM.