This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: undefined reference to `vtable for ...'
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Denys Duchier <Denys dot Duchier at ps dot uni-sb dot de>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 05 Sep 2002 09:31:10 +0100
- Subject: Re: undefined reference to `vtable for ...'
- Organization: Codesourcery LLC
- References: <isadmxgy8u.fsf@elk.ps.uni-sb.de>
Denys Duchier wrote:
> /home/denys/Mozart/mozart-gcc3/mozart/platform/emulator/mozart.h:725: undefined reference to `vtable for WidthPropagator'
you have not defined all the functions declared in WidthPropagator. May be
WidthPropagator::getProfile. To save space, g++ only emits the vtable in the
object file containing a 'key' function. If you don't define the key
function, you won't get a vtable either. (there are some other cases).
This is not a bug, as even if you had the vtable, it'd reference the
undefined key function, and so get an error.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org