I'm going through the old Trolltech Qt tutorials as I find them more helpful than the newer ones and an undefined reference to vtable
error hits me when I got to a class widget implementing its own signals.
http://doc.trolltech.com/4.0/tutorial-t7.html
Instead of keeping the code separate, I just copied them all in the same .cpp
for convenience.
I snooped around and found that a vtable error is caused by an undefined virtual function. However, I didn't omit anything from the tutorial code except the code separation. Omitting the Q_OBJECT
macro from lcdrange.h
as well as the slots and signals seem to make the project compile. I figure it's void valueChanged(int newValue);
at lcdrange.h
that is causing the fuss but the tutorial did not provide a definition. I'm sure they won't post code that isn't working so I must be doing something wrong. I'm using C::B(MinGW) if that means anything. I'm also new to C++.