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>
|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)
|References: ||<3ca78d87$0$364$9b622d9e AT news DOT freenet DOT de>
|X-Trace: ||nets3.rz.RWTH-Aachen.DE 1017832849 22846 220.127.116.11 (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
|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
> 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;
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -