About

© 2010 Eduardo Poyart. About

June 6, 2010

Undefined symbols: "vtable for ..."

When writing a Crystal Space application based on the tutorials, I had a class that inherits from Crystal Space's csApplicationFramework and csBaseEventHandler. Upon editing the code and compiling, I ended up getting the following error: (Lod is my class name)

Undefined symbols:
  "vtable for Lod", referenced from:
      Lod::~Lod()  in lod.o
      Lod::Lod()   in lod.o

This is caused by declaring a member prototype (for example) "bool OnKeyboard (iEvent&);" and not defining it on the cpp file. I'm not sure why the error points to the constructor and destructor and not to the member function, but if you run into that, check all your prototypes vs. defined functions.

No comments:

Post a Comment