Date: Wed, 10 Sep 1997 20:07:55 -0700 (PDT) Message-Id: <199709110307.UAA07693@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" To: Carsten =?iso-8859-1?Q?Sch=E4uble?= , djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: undefined reference to __builtin_delete Content-Transfer-Encoding: 8bit Precedence: bulk At 04:31 9/10/1997 +0200, Carsten Schäuble wrote: >i compile a complete independent (no includes, no inheritance) c++ class >with > > gcc -c -Wall -o ctrl.o ctrl.c > >if i define my own destructor in the class, the linker > > ld -t -oformat coff-go32 -e startup -Ttext 0x10000 -o system startup.o >main.o ctrl.o Do you have some objection to using the standard startup code and libraries? > >aborts with error > > ctrl.o(.text+0x15):ctrl.cc: undefined reference to __builtin_delete > >if the destructor is not defined (the standard destructor is used), so >it works fine I assume your destructor uses `delete'. The delete operator lives in libgcc.a, so you'll have to link with it. If it complains about unresolved references to `free', you'll need to link with the C library as well. HTH Nate Eldredge eldredge AT ap DOT net