QTcpSocket: No such file or directory
-
Going by the tutorial on http://www.bogotobogo.com/Qt/Qt5_QTcpSocket.php page, it states to put in a #include <QTcpSocket> in the mytcpsocket.h header file. But I recieve the following message: QTcpSocket: No such file or directory. When I type #include < a list of header files appear but QTcpSocket is not listed. Is there something else I need to install in order to create sockets?
-
The pro file has the following:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4) QT += widgetsthen the target, template, sources headers and forms.
I need to add another line for QT += network after the QT += core gui?
-
Hi,
No, you can also append it after gui. You have the choice
-
Thanks, works now.
-
You're welcome !
Since you have your code running, please update the thread title prepending [solved] so other forum users may know a solution has been found :)
-
@SGaist I have the same problem and I have done everything listed above but nothing help what is the problem?? I just can't realize
QT += core
greaterThan(QT_MAJOR_VERSION, 4) QT += widgets
QT -= gui
QT += network
CONFIG += c++11TARGET = Server_Part
CONFIG += console
CONFIG -= app_bundleTEMPLATE = app
SOURCES += main.cpp
my_server.cppHEADERS +=
my_server.h -
Hi,
Did you rebuild from scratch after modifying your .pro file ?