LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-10-2009, 08:09 AM   #1
bskumar7080
Member
 
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, 08:18 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

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

From the man page
Code:
       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
       gcc).

       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, 08:20 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Did you Google?

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


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

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

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