delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/31/15:55:14

From: dbell-hvp AT m140 DOT aone DOT net DOT au (David JD Bell)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Hello, question, probably been asked a billion times before.
Date: Mon, 31 Mar 1997 06:52:59 GMT
Organization: Hidden Valley Plantations
Lines: 23
Message-ID: <333f5de7.18493796@news.mcy.aone.net.au>
References: <199703270107 DOT UAA01491 AT hcst DOT net>
NNTP-Posting-Host: d216-1.cpe.maroochydore.aone.net.au
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

"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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019