I have the following program:
#include <QApplication>
#include <QMainWindow>
class Window : public QMainWindow
{
Q_OBJECT
public:
virtual ~Window() {};
};
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Window window;
window.show();
return app.exec();
}
I ran qmake to get a project file, but when I run make, I get:
main.cpp:(.text.startup+0x50): undefined reference to `vtable for Window'
Googling the problem I see a lot of solutions saying to add the header file for your class to the HEADERS
variable in the qmake project file. But I don't have a header file. What can I do?