Hi,
I have the following case:
Class MTelemetry is defined in an H file, at the moment its an empty class, implementing the defalut constructor and destructor in the H file it self, so there is no implementation file for it.
I subclass it to class MServCon.
Compiling goes well, but the linker complains:
MServCon includes mtelemetry.h.obj/mservcon.o: In function `MServCon::MServCon(QObject*)':
mservcon.cpp.text+0x14): undefined reference to `vtable for MTelemetry'
I tried adding a forward declaration to MServCon, didn't help.
What I might be missing?
Here is the link line:Thanks.g++ -Wl,-rpath,/usr/local/Trolltech/Qt-4.1.4/lib -o TMServCon obj/main.o obj/mservcon.o obj/moc_mservcon.o -L/usr/local/Trolltech/Qt-4.1.4/lib -lQtNetwo
Ofcourse one second oafter I posted I realized the problem - MTelemetry didn't get moc'ed...
Bookmarks