LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-21-2005, 08:54 AM   #1
contiang
Member
 
Registered: Dec 2004
Location: malaysia
Distribution: Redhat-7.2, VectorLinux-5.0 Standard
Posts: 46

Rep: Reputation: 15
Smile g++??


hi guys,

I am trying to install GloMoSim onto my linux Redhat-7.2 (Enigma) machine. I am using 2.4.30 kernel. Unfortunately it was unsuccessful because of my linux didn't recognize g++ command. Is it different between gcc and g++? Where can i get g++ source code? Any ideas guys?
 
Old 04-21-2005, 09:09 AM   #2
redhatrosh
Member
 
Registered: May 2004
Location: Student of University of Mumbai, Maharastra State, India
Distribution: Redhat Linux 9.0, Knoppix LIVE CD, Ubuntu Live CD, Kubuntu Live CD
Posts: 483

Rep: Reputation: 30
In short, g++ is a compiler for CPLUS PLUS, and AFIK, gcc compiler is capable of compiling C and C++ programs. I dont know the core difference.
The following link gives you the details from where you could download, read documents, etc....

http://directory.fsf.org/GNU/gpp.html

Secondly, for a small tutorial, (from a university or college) you can check,

http://www.cs.wm.edu/cspages/computi...orial/gpp.html

Enjoy!
 
Old 04-21-2005, 12:22 PM   #3
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
GCC is the GNU Compiler Collection. The command to run the C compiler is gcc, the command to run the c++ compiler is g++. That's the difference.
 
Old 04-21-2005, 01:14 PM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
If you want to be super technical about it, g++ is really just a wrapper for gcc.

"g++" is equivelent to "gcc -lstdc++". gcc can and will automatically detect the code you have is C++ code, but without linking in the libstdc++ library you can't use the base C++ functionality (like the string header for instance). The "g++" executable just automatically includes libstdc++ so you don't have to type out the -lstdc++ part each time.

That being said... I've definitely coded c++ in embedded environments where you have to use gcc and not c++ because you have to use a special cut down version of libstdc++ so you don't want your compiler to automatically link the full version in.

Eitherway... you probably need to install the gcc-g++ package or the stdc++ package for your distribution.
 
Old 04-21-2005, 09:22 PM   #5
contiang
Member
 
Registered: Dec 2004
Location: malaysia
Distribution: Redhat-7.2, VectorLinux-5.0 Standard
Posts: 46

Original Poster
Rep: Reputation: 15
hi guys,

i've already solved my problem.. I've found "gcc-g++" rpm package in my disc 2 redhat-7.2 installation cd. Now I am successfully run mu GloMoSim. Thanks guys....
 
  


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



LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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