public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: random@bubblescope.net
To: Sampath Kumar Herga <sherga@airvananet.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Gcc/g++
Date: Wed, 13 Jul 2005 15:53:00 -0000	[thread overview]
Message-ID: <42D5386E.2020005@bubblescope.net> (raw)
In-Reply-To: <653F3CF58193744C9DE59C217C072B5814DFE2@nilgiri.india.wirelessworld.airvananet.com>

Sampath Kumar Herga wrote:

> Hi,
>
>I am new to this group and had a very basic question. What is the
>difference between gcc and g++ when compiling c++ files. 
>
Short version: Don't use gcc to compile c++ files unless you know what
you are doing :)

>Also if we have
>a mix of c and c++ files in a project, which is the better compiler to
>use?
>
>  
>
If you C files are also valid C++ (which there is a good chance there
will be, espically if they are well written), it would be easiest to
compile them all as C++. If you can't / don't want to do this, you'll
have to use the "extern C" notation to mark any functions called from,
or defined in, a C file.

>Please let me know if this is not the correct mailing-list for this
>question.
>
>  
>
I'm fairly sure it is :)
Chris

  reply	other threads:[~2005-07-13 15:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13 15:48 Gcc/g++ Sampath Kumar Herga
2005-07-13 15:53 ` random [this message]
2005-07-13 16:26 Gcc/g++ Eljay Love-Jensen
2005-07-14  8:59 Gcc/g++ Sampath Kumar Herga
2005-07-14 13:30 ` Gcc/g++ Ishwar Rattan

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=42D5386E.2020005@bubblescope.net \
    --to=random@bubblescope.net \
    --cc=gcc-help@gcc.gnu.org \
    --cc=sherga@airvananet.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).