LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2008, 11:09 AM   #1
zensunni
Member
 
Registered: Feb 2008
Posts: 45

Rep: Reputation: 0
How to install G++ compiler


I've just installed Fedora core 8 and I used the add/remove software feature to install GCC. Apparently, g++ is bundled into the gcc program. When I type in..

Code:
g++ -o hello_world
..I just get a bash command error saying "command not found". I'm kind of unsure as to where to go from here. If I've installed gcc, shouldn't g++ be there too?

Thanks for any help.
 
Old 02-19-2008, 11:30 AM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
...it may be, I'm not too sure how Fedora bundles the GNU Compiler Collection (GCC).

(As an aside, keep in mind, the "-o [string]" option just sets the output binary name to [string] instead of "a.out" - you need to supply a third argument: "g++ -o hello_world hello_world.cpp".)

With Debian, the gcc package only installs the C compiler of the GNU Compiler Collection; the g++ package installs the C++ compiler. Check and see if there's a g++ package (or something similar) in the Add/Remove Programs utility (I think it's called "pirut").
 
Old 02-19-2008, 06:52 PM   #3
zensunni
Member
 
Registered: Feb 2008
Posts: 45

Original Poster
Rep: Reputation: 0
I figured it out:

I just needed to type "yum install gcc-c++"

But now I'm confused about what yum is. Does Fedora have multiple package managers?
 
Old 02-19-2008, 06:56 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Pirut is a gui version of yum (or frontend - not quite sure which). Both use same mechanics as far as I can tell.

That said, I still prefer yum from the command line
 
Old 02-20-2008, 08:09 AM   #5
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
I believe Pirut is a front-end to Yum (which is, in turn a front-end to rpm) which is much like in Debian where aptitude, synaptic and apt-get are front-ends to apt, which is a front-end to dpkg.
 
  


Reply



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
C compiler install Regis Linux - Newbie 12 05-19-2008 10:38 AM
can not install g++ compiler adilturbo Linux - General 8 01-27-2007 06:16 PM
how to install c compiler albanas Linux - Newbie 5 12-25-2004 01:31 AM
How do I install a C compiler? genesis1923 Linux - Newbie 8 09-24-2003 02:17 PM
How do I install a C compiler? genesis1923 Linux - Newbie 0 08-12-2003 12:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:32 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