This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: undefined reference to `vtable for ...'


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]