Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-10-2009, 09:09 AM   #1
Registered: Aug 2009
Distribution: Mandriva
Posts: 57

Rep: Reputation: 15
What is the difference between gcc and g++

I want to know the difference between gcc and g++
Old 08-10-2009, 09:18 AM   #2
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
gcc is a C compiler and g++ a C++ compiler

From the man page
       C++ source files conventionally use one of the suffixes .C, .cc, .cpp,
       .CPP, .c++, .cp, or .cxx; C++ header files often use .hh or .H; and
       preprocessed C++ files use the suffix .ii.  GCC recognizes files with
       these names and compiles them as C++ programs even if you call the com‐
       piler the same way as for compiling C programs (usually with the name

       However, the use of gcc does not add the C++ library.  g++ is a program
       that calls GCC and treats .c, .h and .i files as C++ source files
       instead of C source files unless -x is used, and automatically speci‐
       fies linking against the C++ library.  This program is also useful when
       precompiling a C header file with a .h extension for use in C++ compi‐
       lations.  On many systems, g++ is also installed with the name c++.

       When you compile C++ programs, you may specify many of the same com‐
       mand-line options that you use for compiling programs in any language;
       or command-line options meaningful for C and related languages; or
       options that are meaningful only for C++ programs.
Old 08-10-2009, 09:20 AM   #3
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Did you Google?

C and C++, maybe? Actually, I've seen two expansions of "gcc":
Gnu C Compiler
Gnu Compiler Collection


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
shell script to find the difference betwwn two file and place the difference to other kittunot4u Linux - General 3 07-19-2010 05:26 AM
Small difference when compiled with gcc and g++ drigz Programming 5 06-15-2006 05:09 PM
any difference between gcc-c++ and gcc-g++ RajRed Linux - Software 5 12-03-2005 12:37 PM
what is the difference b/w these two? (gcc related) tuxfood Programming 1 07-20-2004 10:48 AM
what IS the difference between g++ and gcc? acid_kewpie Programming 5 12-08-2001 07:11 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:02 PM.

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