matt
matt

Reputation: 1

QTcpServer error C1083, "no such file or directory"

I am using Qt 5.4.1 offline version and I am getting a file not found error for QTcpServer. I posted my .pro file to show that I do have the += network in there. Please let me know if you have any idea why I am getting this error! Thanks!

#-------------------------------------------------
#
# Project created by QtCreator 2015-03-21T22:26:44
#
#-------------------------------------------------

QT       += core
QT       += network
QT       -= gui

TARGET = MultiServer2
CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = app


SOURCES += main.cpp \
    myserver.cpp \
    mythread.cpp

HEADERS += \
    myserver.h \
    mythread.h

//BEGIN SERVER HEADER FILE BELOW

#ifndef MYSERVER_H
#define MYSERVER_H

#include <QTcpServer>     //  <--- THIS IS WHAT IS NOT BEING FOUND
#include <QDebug>
#include "mythread.h"

class MyServer : public QTcpServer
{
    Q_OBJECT
public:
    explicit MyServer(QObject *parent = 0);
    ~MyServer();

    void startServer();

signals:

public slots:

protected:
    void incomingConnection(int socketDescriptor);

};

#endif // MYSERVER_H

Upvotes: 0

Views: 2157

Answers (1)

HuangYang
HuangYang

Reputation: 81

You need to re-run qmake if any changes in .pro file (if adding Qt += network)

Build->Run qmake.

Upvotes: 2

Related Questions