You are not logged in.

#1 2016-08-26 21:18:52

Chef_Keeper
Member
Registered: 2015-02-27
Posts: 18

[RESOLVED] QTNetwork

Hello,

I've been trying to compile a QT5 project on my arch but I always get the same error : "fatal error: QTNetwork: No such file or directory"
I even just took the hello example from the wiki : wiki, and just added the include :

#include <QApplication>                                                                                                                                                                     
#include <QLabel>                                                                                                                                                                           
#include <QTNetwork>         // this line added                                                                                                                                                               
                                                                                                                                                                                            
int main(int argc, char **argv)                                                                                                                                                             
{                                                                                                                                                                                           
  QApplication app(argc, argv);                                                                                                                                                             
  QLabel hello("Hello world!");                                                                                                                                                             
                                                                                                                                                                                            
  hello.show();                                                                                                                                                                             
  return app.exec();                                                                                                                                                                        
}

and my .pro looks like this :

 ######################################################################
# Automatically generated by qmake (3.0) Fri Aug 26 22:11:44 2016
######################################################################

QT += \
 network \
 widgets \
 core

TEMPLATE = app
TARGET = hello
INCLUDEPATH += .

# Input
SOURCES += hello.cpp

I don't know if it's the right place to ask, but project works on mac and windows (created with qt IDE and I don't want to install it just to compile)

Cheers,

Last edited by Chef_Keeper (2016-08-27 09:51:30)

Offline

#2 2016-08-26 23:40:22

equeim
Member
Registered: 2016-03-27
Posts: 22

Re: [RESOLVED] QTNetwork

#include <QtNetwork>

It works on Windows probably because of case-insensitive filesystem.

Offline

#3 2016-08-27 09:50:33

Chef_Keeper
Member
Registered: 2015-02-27
Posts: 18

Re: [RESOLVED] QTNetwork

HOLY COW thank you very much big_smile !
Works like a charm now, I'd probably never found it by myself.

How to change topic to resolved ?

Offline

Board footer

Powered by FluxBB