In my class I am trying to create a new instance of my webserver object:
.h
class Stub : public QObject
{
Q_OBJECT
public:
Stub(QObject *parent = 0);
~Stub();
private:
WebSocketServer *m_webSocketServer;
.cpp
Stub::Stub(QObject *parent)
: QObject(parent)
{
//Start Websocket-Server
m_webSocketServer = new WebSocketServer(8000, true,this);
}
My server constructor looks like:
explicit WebSocketServer(quint16 port, bool v = true, QObject *parent = Q_NULLPTR);
but it throws errors like this:
Error 7 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall WebSocketServer::~WebSocketServer(void)" (__imp_??1WebSocketServer@@UAE@XZ) referenced in function "public: virtual void * __thiscall WebSocketServer::`scalar deleting destructor'(unsigned int)" (??
Error 10 error LNK2001: unresolved external symbol "public: virtual void * __thiscall WebSocketServer::qt_metacast(char const *)" (?qt_metacast@WebSocketServer@@UAEPAXPBD@Z)
Error 8 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall WebSocketServer::metaObject(void)const " (?metaObject@WebSocketServer@@UBEPBUQMetaObject@@XZ)
Error 9 error LNK2001: unresolved external symbol "public: virtual int __thiscall WebSocketServer::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@WebSocketServer@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
my webserver is working, just when creating instance of that it crashes. I tried adding libraries, included .h files, all names match