Yes, I am getting "undefined reference to `vtable for Window'"
Unsolved
General and Desktop
-
Hello,
So, I am getting the error when I do the build:
$ clang++ -g -std=c++14 subc*.cpp -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -lQtCore -lQtGui$ tmp/subcl-f65a46.o: In function
Window': undefined reference to
vtable for Window'
clang: error: linker command failed with exit code 1 (use -v to see invocation)I am on Linux, I am not using Qt Creator, I am not using qmake. That is because this GUI qt project will be added to a (very) large project with its own build system based on make files.
This is the example straight out of the Qt For Beginners page.
// subcl.h #ifndef SUBCL_H #define SUBCL_H #include <QWidget> class Window : public QWidget { Q_OBJECT public: explicit Window(QWidget *parent = 0); virtual ~Window(); signals: public slots: }; #endif // subcl.cpp #include "subcl.h" Window::Window(QWidget *parent) : QWidget(parent) {} Window::~Window(void) {} // subclmain.cpp #include <QApplication> #include "subcl.h" int main(int argc, char **argv) { QApplication app (argc, argv); Window window; window.show(); return app.exec(); }
I've done the googling.
Can someone help me with this -- thank you!