www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/01/23:49:48

Date: Wed, 1 Apr 1998 18:01:24 -0800 (PST)
Message-Id: <199804020201.SAA18693@adit.ap.net>
Mime-Version: 1.0
To: VAMPYR <vampyr AT ms1 DOT accmail DOT com DOT tw>, DJGPP Mailing List <djgpp AT delorie DOT com>
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: What are differents between GCC.EXE and GXX.EXE

At 02:25  4/1/1998 +0800, VAMPYR wrote:
>As title.
>I heard GCC is C compilier, GXX is C++ compilier,
>but why I can use C++ class parse in GCC.EXE ?

The `gcc' program determines whether your program is C or C++ by the
extension, so you technically can compile both C and C++ with it. The
trouble occurs when you link: C++ programs usually need to be linked with a
C++ library. The compiler driver can't figure this out itself, since there's
no visible distinction between C and C++ object files, so you have to tell
it by adding `-lstdcxx' and such to the command line. `gxx' is just a
wrapper program that does this for you and calls gcc. It could conceivably
be written as a shell script like this:

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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