Qt Object Linker Problem " undefined reverence to vtable"
- by Thomas
This is my header:
#ifndef BARELYSOCKET_H
#define BARELYSOCKET_H
#include <QObject>
//! The First Draw of the BarelySocket!
class BarelySocket: public QObject
{
Q_OBJECT
public:
BarelySocket();
public slots:
void sendMessage(Message aMessage);
signals:
void reciveMessage(Message aMessage);
private:
// QVector<Message> reciveMessages;
};
#endif // BARELYSOCKET_H
This is my class:
#include <QTGui>
#include <QObject>
#include "type.h"
#include "client.h"
#include "server.h"
#include "barelysocket.h"
BarelySocket::BarelySocket()
{
//this->reciveMessages.clear();
qDebug("BarelySocket::BarelySocket()");
}
void BarelySocket::sendMessage(Message aMessage)
{
}
void BarelySocket::reciveMessage(Message aMessage)
{
}
I get the Linker Problem : undefined reference to 'vtable for barelySocket'
This should mean, i have a virtual Function not implemented. But as you can see, there is non.
I comment the vector cause that should solve the Problem, but i does not.
The Message is a complex struct, but even converting it to int did not solve it.
I searched Mr G but he could not help me.
Thank you for your support,
Thomas