ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/03/06:30:29

X-Authentication-Warning: delorie.com: mailnull 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: making dxe2gen with clio.rice.edu binaries -or- "undefined reference to 'operator'"?
Date: 3 Apr 2002 11:20:49 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 32
Message-ID: <a8eoih$m9u$1@nets3.rz.RWTH-Aachen.DE>
References: <3ca78d87$0$364$9b622d9e AT news DOT freenet DOT de>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1017832849 22846 137.226.32.75 (3 Apr 2002 11:20:49 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 3 Apr 2002 11:20:49 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

deckerben <deckerben AT freenet DOT de> wrote:
> gcc  -s -o dxe2gen.exe dxe2gen.o -lstdcx
> dxe2gen.o(.text+0xc80):dxe2gen.cpp: undefined reference to `operator
> new[](unsigned long)'

Hmm... dxe2gen.cpp is a C++ source file.  The recommended method of
linking those is not the one shown above, but rather

	gpp -s -o dxe2gen.exe dxe2gen.o

(or gxx in place of gpp, for older GCC ports or DJGPP's).  Please try
that and see if it helps.  The difference between the two is that only
the installed GCC itself really knows with 100% certainty what the
proper names and linking order of C++ runtime support libraries is.
That's the whole reason of existence of "g++" (on Unixen), which DJGPP
calls "gpp" to work around filename limitations.

IOW: the version of DXE2 you're using may well be incompatible with
modern GCC's.

> The plot thickens: I looked at all the "dxe2gen" source code and the token
> "operator" isn't even anywhere in the code! 

Of course it isn't.  But "new" is present, and it is an operator.
"operator new[](unsigned long)" is the name of the hidden function of
the C++ runtime that's supposed to be executed every time the source
does something like this:

	unsigned long *array = new[30];
-- 
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