LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-13-2007, 06:05 AM   #1
ciden
Member
 
Registered: Dec 2006
Location: New Delhi, India
Distribution: PCLinuxOS 2010
Posts: 246
Blog Entries: 1

Rep: Reputation: 31
why is gcc(and not g++) default compiler in debian?


Why is gcc default and not g++?
If u r answering this, also tell me if g++ replaces gcc.
 
Old 02-13-2007, 06:10 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
gcc is a c compiler, g++ is a c++ compiler.
 
Old 02-13-2007, 06:24 AM   #3
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Also.... g++ is basically just gcc with a few command line options (mainly -lstdc++). Gcc actually determines what kind of code its been presented and compiles it accordingly.
 
Old 02-13-2007, 11:09 AM   #4
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
gcc must be the standard compiler because the Linux kernel is written in C, not c++. And, you must have the gcc compiler to compile g++ since g++ is written in C.
 
Old 02-15-2007, 08:23 AM   #5
ciden
Member
 
Registered: Dec 2006
Location: New Delhi, India
Distribution: PCLinuxOS 2010
Posts: 246

Original Poster
Blog Entries: 1

Rep: Reputation: 31
Thanks people.
I was confused coz in Windoze I just use Turbo C++ to compile C-programs as well.
I forgot that C compilation was so central to linux 4 installation.
 
Old 02-15-2007, 12:33 PM   #6
indian
Member
 
Registered: Aug 2004
Posts: 137

Rep: Reputation: 15
You still use Turbo C++ ? isn't it dead ? Anyway GCC and G++ are same with G++ having some additional features as poitned by others.
 
Old 06-03-2008, 04:38 AM   #7
raedbenz
Member
 
Registered: Dec 2007
Posts: 93

Rep: Reputation: 15
C in Kernel

Quote:
Originally Posted by gnashley View Post
gcc must be the standard compiler because the Linux kernel is written in C, not c++. And, you must have the gcc compiler to compile g++ since g++ is written in C.
HI,
why Kernel is written in C not other O-O language(like C++)??
thanks
 
Old 06-03-2008, 04:44 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
please don't drag up dead threads. if you have a question, please start your own thread.
 
  


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
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 12:35 PM
making old version of GCC your default compiler knobby67 Programming 4 08-01-2006 04:21 PM
default array size for variable in gcc compiler mlaich Programming 13 01-04-2006 05:40 PM
GCC Compiler..... mani_iips Linux - Newbie 4 08-08-2005 08:55 PM
GCC Compiler HELP Otaking Linux - Newbie 5 04-08-2004 06:17 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:14 AM.

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