undefined reference to `vtable for ...'

Nathan Sidwell nathan@codesourcery.com
Thu Sep 5 01:32:00 GMT 2002


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



More information about the Gcc-bugs mailing list