delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/11/20/11:37:15

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: 20 Nov 2003 18:10:47 +0200
Message-Id: <ufzgjvx4o.fsf@elta.co.il>
From: Eli Zaretskii <eliz AT elta DOT co DOT il>
To: djgpp AT delorie DOT com
In-reply-to: <7b68d58f.0311200708.325c05db@posting.google.com>
(Thomas8675309 AT yahoo DOT com)
Subject: Re: Newbie Allegro problems
References: <71c90d2a DOT 0311191635 DOT 1ebf4263 AT posting DOT google DOT com> <uekw3in7i DOT fsf AT elta DOT co DOT il> <7b68d58f DOT 0311200708 DOT 325c05db AT posting DOT google DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Thomas8675309 AT yahoo DOT com (Tom)
> Newsgroups: comp.os.msdos.djgpp
> Date: 20 Nov 2003 07:08:54 -0800
> > 
> > Since exsprite.c has a `.c' extension, it's probably a C program, not
> > a C++ program.  So why did you use gpp to compile it?  Please try
> > using gcc instead, and see if that helps.
> 
> This demonstrates a difference between gxx and gpp that I was not
> previously aware of.  gxx, like gcc, uses the file's extension to
> decide whether to use the C compiler or C++ compiler.  In contrast,
> gpp apparently ignores the file's extension and compiles it using the
> C++ compiler.

I think this is true.

> Both gxx and gpp automatically link in the C++ standard library, while
> gcc does not.

Right.  In fact, the _only_ situation where gxx/gpp are really useful
is when you _link_ C++ programs.  To _compile_ C++ programs, gcc is
sufficient.

Personally, I always use gcc when compiling sources into object files.

> Are there other differences in expected behavior between gpp and gxx?

They are two different programs, so you should expect them to behave
in slightly different ways.  Functionally, they are equivalent,
i.e. they attempt to do the same job, but when they bump into abnormal
situations, they react differently.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019