I understand that the undefined reference to vtable error means that I have a pure virtual function that must be implemented. I cannot for the life of me find what I am missing to make this class compile.
WaspThread.h
#include <QThread>
{
Q_OBJECT
protected:
void run();
};
#include <QThread>
class WaspThread : public QThread
{
Q_OBJECT
protected:
void run();
};
To copy to clipboard, switch view to plain text mode
WaspThread.cpp
#include "WaspThread.h"
void WaspThread::run()
{
}
#include "WaspThread.h"
void WaspThread::run()
{
}
To copy to clipboard, switch view to plain text mode
project.pro
SOURCES += WaspThread.cpp
HEADERS += WaspThread.h
SOURCES += WaspThread.cpp
HEADERS += WaspThread.h
To copy to clipboard, switch view to plain text mode
I have the header and source files in my project file. I have tried cleaning out my build directory and re-running qmake multiple times.
Added after 21 minutes:
I just figured out the problem. I had forgotten to export the WaspThread class so that the executable utilizing the DLL could find WaspThread. It was a silly mistake. I made it because I forgot that in Windows land you need to export everything whereas in Linux you don't.
Bookmarks