LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-15-2009, 04:37 AM   #1
PrathuD
LQ Newbie
 
Registered: Oct 2008
Location: India
Distribution: Fedora9
Posts: 7

Rep: Reputation: 0
Question 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.

Code:
[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.
Code:
[root@localhost ~]# yum install make
Loaded plugins: refresh-packagekit
Existing lock /var/run/yum.pid: 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..
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-15-2009, 05:20 AM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

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

Quote:
bash: g++: command not found
So, either g++ is not installed or it's not in $PATH.
 
Old 03-15-2009, 06:48 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
  • # yum -y install gcc-c++
will provide /usr/bin/g++


.....

Last edited by knudfl; 03-15-2009 at 06:49 AM.
 
2 members found this post helpful.
Old 03-16-2009, 12:44 PM   #4
PrathuD
LQ Newbie
 
Registered: Oct 2008
Location: India
Distribution: Fedora9
Posts: 7

Original Poster
Rep: Reputation: 0
@knudfl
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++.
Thanx..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc compile error (-lmysql: command not found) xface66 Programming 2 04-13-2007 09:00 AM
roo tail, make Error 127, /bin/sh: rman: command not found DraaX Linux - Desktop 4 08-28-2006 09:57 PM
make: Command not found, Error 127. I'm on Redhat Arild2 Linux - Newbie 3 10-30-2004 01:27 PM
make error : gtkdoc-scan: command not found Kanaflloric Linux - Software 1 08-25-2004 02:42 PM
make: cc: command not found make: *** [gzip.o]error 127 zyjk Linux - Newbie 5 02-08-2002 09:58 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration