Mail Archives: djgpp/1997/09/10/23:10:03
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
- Raw text -