NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. Part 1
Currently I am trying to learn C++ and using the Qt framework. Every now and then the linker complains "NOTE: a missing vtable usually means the first non-inline virtual member function has no definition."
So far, so good.
I've googled what that means in detail and hunted down most of the bugs that caused this "message of horror". But right now I am sitting in front of a piece of code that is, well, correct. At least I can't see any errors and not why the linker complains. My fault for sure. Let's see where this journey ends.
Some articles gave a hint for a new run of the moc compiler to create the stuff that comes in your code with
QObject. That sounded sane first, because I have added
QObject to the class later during coding to use signals and slots. It was a pure C++ class first. On the other hand I have done the clean/run qmake routine some times now - just to be sure.
But curiosity led to me to have a closer look to the filesystem, since the moc compiler should create some files in the destination directory. It did. The mess was in the source directory: I had changed a class from
.MM because it got some Objective-C code. Well, QtCreator left the
.CPP file where it was and made a new copy. Thus during compiling this file caused the trouble (what is somehow mysterious in itself: the
.CPP file wasn't mentioned in the
Never totally trust your IDE ;-)
Ok, all is fine now...should be...added a signal and a slot and even after the clean/run qmake routine the message comes again.
But that's another story...!