delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/10/09:37:42

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Wed, 10 Apr 2002 16:25:53 +0300 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
X-Sender: pavenis AT ieva06
To: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Cc: djgpp AT delorie DOT com
Subject: Re: making dxe2gen with clio.rice.edu binaries -or- "undefined
reference to 'operator'"?
In-Reply-To: <a90vct$t5q$1@nets3.rz.RWTH-Aachen.DE>
Message-ID: <Pine.A41.4.05.10204101617420.30580-100000@ieva06>
MIME-Version: 1.0
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


On 10 Apr 2002, Hans-Bernhard Broeker wrote:

> Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
> 
> > I think there's a confusion between compilation and linking.  `gcc' knows 
> > friom the file-name extension it's a C++ program, so it compiles it as 
> > such; but it does _not_ instruct the linker to scan the C++ libraries.  
> > `gpp' does the latter.
> 
> Hmm... yes, looks like it (tested with GCC-2.95.2 on Linux).  I'm
> surprised.  I was pretty certain that if you did linking and
> compilation in one go, gcc recognized that the source file(s) are in
> C++, so the C++ runtime should be linked in automatically.  I.e. I thought
> 
> 	gcc -o hello hello.cpp
> 
> worked.  Turns out it doesn't ;-(
> 
> Time for a memory reboot, it seems.

Known thing. Part of C++ support which was earlier in libgcc.a is now
no more there. One can link with libsupcxx.a which contains only this
stuff moved out of libgcc.a). Anyway the same stuff is also in
libstdcxx.a so one can use that. The difference is with dynamic linking
where it's supported (why to have to require libstdc++ when C++ standard
program library is not used).

Anyway one can try to compile source using options
	-fno-rtti -fno-exceptions
and in this case maybe one can avoid use of one of libstdcxx.a or
libsupcxx.a

One more thing is that using libstdcxx.a requires to link with libm.a
more often than with previous GCC versions. gpp.exe does that
automatically. 

Andris



- Raw text -


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