Mail Archives: djgpp/1997/03/31/15:55:14
"Bryan Murphy" <bf461 AT cleveland DOT freenet DOT edu> wrote:
>And, what does undefined reference to OBJECT virtual table mean
>anyways?
>
I was going to ask exactly the same question. I got the same thing
and as far as I can tell it was when I used a class BASE pointer to
'new' a class DERIVED variable, where DERIVED is a subclass of BASE
and contains some virtual functions, and where the constructor for
DERIVED has a BASE in the argument list. The program compiled OK but
the error was in the linking.
I think it had something to do with confusion over constructor calls,
because it had to construct the BASE in the argument list (which could
be a DERIVED) before it could construct DERIVED. Any way after mucking
around with the constructors, in particular changing the DERIVED
constructor argument to *BASE, the problem went away.
But I would still like to know what "undefined reference to OBJECT
virtual table" means and was going to ask at one of the gnu.g++
newsgroups. Hope this is of assistance.
David JD Bell, Hidden Valley Plantations, Australia.
- Raw text -