delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/01/14/10:45:10

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: errors
Date: 14 Jan 2004 15:38:41 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 32
Message-ID: <bu3nq1$jc0$2@nets3.rz.RWTH-Aachen.DE>
References: <505545170 DOT 20040114111338 AT surfeu DOT fi> <7b68d58f DOT 0401140715 DOT 444a520 AT posting DOT google DOT com>
NNTP-Posting-Host: ac3b07.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1074094721 19840 137.226.33.205 (14 Jan 2004 15:38:41 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 14 Jan 2004 15:38:41 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Tom <Thomas8675309 AT yahoo DOT com> wrote:

> You should have used "gpp" rather than "gcc":

> gpp -Wall -Wno-deprecated test.cc -o test.exe

> Unlike gcc, gpp links in the C++ library.  

It's not quite that simple.  

In the case at hand (direct compilation + linking of a single-source
C++ program with a recognized C++ filename extension), gcc is supposed
to get it right, too.  If it doesn't, that's a regression in the DJGPP
port of gcc, or in gcc itself.  

Only if you link .o files, of which the compiler doesn't know what
language were made from, should it be necessary to make the choice of
language explicity by calling g++, or for the sake of DOS filename
compatibility, gpp.

	gcc test.cc -o test

always worked, and should continue to work.  Only

	gcc -c test.cc 
	gcc test.o -o test

didn't.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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