From: David Daney <ddaney@avtrex.com>
To: NightStrike <nightstrike@gmail.com>
Cc: Ian Lance Taylor <iant@google.com>,
Dhiraj.Nilange@iflexsolutions.com, gcc-help@gcc.gnu.org,
"Gregg D. Gramatges" <greggdaniel@gmail.com>
Subject: Re: GCC vs G++
Date: Wed, 13 Jun 2007 03:37:00 -0000 [thread overview]
Message-ID: <466F5D5B.1030402@avtrex.com> (raw)
In-Reply-To: <b609cb3b0706121848w3efc3b44u34eab1a1c83cd2e4@mail.gmail.com>
NightStrike wrote:
> On 11 Jun 2007 10:08:11 -0700, Ian Lance Taylor <iant@google.com> wrote:
>> <Dhiraj.Nilange@iflexsolutions.com> writes:
>>
>> > I am using Linux. I am not still sure about the difference between g++
>> > and gcc. Is g++ just a wrapper for gcc? I am not sure which one I
>> should
>> > use
>> > for compiling my C++ codes?
>>
>> g++ is very similar to gcc. The main difference is that g++ assumes
>> that it is compiling C++ (gcc will compile C++ for files ending in
>> ".cc", ".C", etc.), and g++ always links against the standard C++
>> library.
>>
>> When compiling C++ you should use g++ in all normal cases.
>
> So the way I read this is that I *could* use gcc for compiling .cpp
> files that use c++ libraries, correct?
Yes.
> It never seems to work, even
> for a simple "Hello, world."
It works for me everyday, but I know all the special things I have to do
on the platform I am using.
The reason to use g++ is that it works with no special non-portable magic.
David Daney
next prev parent reply other threads:[~2007-06-13 2:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 11:09 Dhiraj.Nilange
2007-06-12 4:20 ` Ian Lance Taylor
2007-06-13 3:12 ` NightStrike
2007-06-13 3:37 ` David Daney [this message]
2007-06-13 21:35 ` me22
2007-06-12 4:31 Timothy C Prince
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=466F5D5B.1030402@avtrex.com \
--to=ddaney@avtrex.com \
--cc=Dhiraj.Nilange@iflexsolutions.com \
--cc=gcc-help@gcc.gnu.org \
--cc=greggdaniel@gmail.com \
--cc=iant@google.com \
--cc=nightstrike@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).