No such file or directory only QTcpServer and QTcpSocket
Hi,
I start to test a socket application (tripserver from "C++ GUI PROGRAMMING WITH QT4"), but, when I type make command I have this message:
massimiliano@nowire:~/lavoro/cvs/openshowvarqt4prove/simpleserver$ make
/usr/bin/uic-qt4 simpleserverwindow.ui -o ui_simpleserverwindow.h
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o main.o main.cpp
In file included from main.cpp:2:
simpleserver.h:2:22: error: QTcpServer: No such file or directory
simpleserver.h:3:22: error: QTcpSocket: No such file or directory
In the .h file I have:
Code:
#include <QTcpServer>
#include <QTcpSocket>
I have no problem whit the other Q class include.
nowire
Re: No such file or directory only QTcpServer and QTcpSocket
From docs:
Quote:
Applications that use Qt's networking classes need to be configured to be built against the QtNetwork module. The following declaration in a qmake project file ensures that an application is compiled and linked appropriately:
QT += network
Re: No such file or directory only QTcpServer and QTcpSocket
OK jpn, now work fine.
I use kdevelop, is possible to set this configuration in a project options?
thanks,
nowire
Re: No such file or directory only QTcpServer and QTcpSocket
Quote:
Originally Posted by
nowire75
I use kdevelop, is possible to set this configuration in a project options?
I believe with KDevelop 3.4 it should be possible.