Qt Object Linker Problem " undefined reverence to vtable"

Posted by Thomas on Stack Overflow See other posts from Stack Overflow or by Thomas
Published on 2010-03-31T19:19:17Z Indexed on 2010/03/31 19:23 UTC
Read the original article Hit count: 504

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about qt

Related posts about qobject