Witajcie. Zadeklarowałem sobię prostą klasę Serwera (własciwie dopiero zaczalem) w QtCreatorze, niestety wyrzuca błąd, który nic nie mówi. Kod prawie przekopiowany z tutoriali
#ifndef SERVER_CPP
#define SERVER_CPP
#include "Headers.hpp"
/**
* @brief The Server class
*/
class Server : public QTcpServer
{
Q_OBJECT
private:
unsigned port;
public:
Server(unsigned port) : port(port) {}
~Server() {}
bool start()
{
if(!listen(QHostAddress::Any, port)) {
return false;
} else {
return true;
}
}
public slots:
};
#endif
błąd:undefined reference to `vtable for Server'
:-1: błąd:collect2: error: ld returned 1 exit status