Why do I get the linker error “undefined reference to `MyFrame virtual table\”?
Probably you do DECLARE_EVENT_TABLE() for MyFrame, but you don’t create an event table. This can actually happen in any case where virtual methods are declared but not defined. This can sometimes happen in roundabout ways, e.g., if you are inheriting from a class with a virtual destructor, but you haven’t defined a virtual destructor for your class. You can find more information about this in the GCC FAQ. One last possible cause is having a #pragma interface without a matching #pragma implementation.
Related Questions
- When building Vim on a Unix system, I am getting "undefined reference to term_set_winsize error. How do I resolve this error?
- Why do I get an error about an undefined reference to "__inet_ntoa" or other __inet_* symbols?
- Why do I get an error message that says "Attempt to edit read-only virtual table (vtab)" ?