🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Stupid noob? Does GCC do C++

Started by
11 comments, last by Dauntless 22 years, 9 months ago
Okay, I know it''s a stupid question, but I know that there is gcc, and g++. Does that mean that if I want to compile in the C++ language that I have to use g++? And if so, where in the hell do I find it? I tried rpmfind.net but couldn''t find it. I did find a debian package for it, but I''m not sure if my mandrake or SuSe system can handle those. Also, does anyone have experience with any of the IDE''s out there? I prefer gnome to KDE, so something that runs under gnome would be nice. And does anyone know if egcs is better than gcc or g++? Thanks
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
Advertisement
gcc is the GNU C Compiler supports c++ too :D
Linux is like a wigwum: No windows, no gates - apache inside... :D
GCC actually now stands for the GNU Compiler Collection. It''s a frontend to several language compilers - g++ for C++, gcj for Java, g77 for Fortran77, cc for C, obj-c or so for Objective-C. For full documentation type
info gcc 

at a terminal prompt.

GCC should have been installed with your system because compilation is such an integral part of running Linux (installing most software requires the ''autoconfig; make; make install;'' cycle). Type
which gcc 

at the terminal prompt to find out where the ''gcc'' executable file lives. If it returns ''file not found'' then you know you don''t have it installed. AT RPMFind.net, type gcc in the search box and it will return the names of packages that contain gcc. Look for the one for your distro and version, and then check for its dependencies. Grab all the necessary RPMs and go install.
g++ is just a wrapper around gcc. The only difference is that g++ always expects C++ sources, while gcc decides based on the file extension (and commandline switches).

cu,
Prefect

One line of sourcecode says more than a thousand words.
Widelands - laid back, free software strategy
quote: Original post by Prefect
g++ is just a wrapper around gcc.


Got that backwards, dude. gcc is the front end to g++ and many other compilers. See post above yours.
Cool beans, thanks everyone.

So gcc is actually a front end for the compilers? That''s pretty neat. Now if only there was a good IDE to use I dread the prospect of having to do command line compiling and linking (sheesh, I don''t even understand debugging in VC++....I can''t imagine what gdb must be like). But oh well, it''s free, and you can''t beat that.
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
IDEs: KDevelop (KDE), Anjuta (GNOME).
gdb is not that hard, but I would use either DDD ,xxgdb or so other more graphical debuger.

Some IDE''s to look are kdevelop, anjuta, kdestudio,gide and more.

some like to use (x)emacs as IDE.

but before you start to use IDE it''s good to know what really is
happening behind it.
quote: Original post by Oluseyi
IDEs: KDevelop (KDE), Anjuta (GNOME).


I''m not 100% sure but I think that KDevelop works also under GNOME (even if it was initialy developed for KDE). You certainly cannot use the dialog editor but the IDE itself should work (you may need Qt though).
I like KStudio too. It seems a little simpler than Kdevelop, although the command line is still the best way in my opinion.

This topic is closed to new replies.

Advertisement