Author Topic: Using Qt4 with Code::Blocks (QtNetwork, QTcpClient, ... etc)  (Read 8193 times)

YoSarin

  • Guest
Using Qt4 with Code::Blocks (QtNetwork, QTcpClient, ... etc)
« on: April 04, 2008, 09:04:53 pm »
Hello,
i have a small problem with compiling an application which uses libs QtNetwork, QTcpClient, ... etc. In source code is standard include:
#include <QtNetwork>
During compilation there is allways error message like this:

QtNetwork: No such file or directory

At Qt forums is solution - add line QT += network into *.pro file. Well, i done this, after that i have succesfully compiled program:
$ qmake
$ make
Voilá! Succes. But in Code::Blocks i am unable to compile it succesfully. Even if in project/Build options.../pre-build steps is qmake written. Still gets the same error.

Thanks for each advice.

And apologize my english please, i'm not used to use it. :)

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Using Qt4 with Code::Blocks (QtNetwork, QTcpClient, ... etc)
« Reply #1 on: April 04, 2008, 11:09:22 pm »
Qt is not supported with the out of the box installation of C::B. Try using a custom Makefile or the QtWorkbench plugin.
Life would be so much easier if we could just look at the source code.

YoSarin

  • Guest
Re: Using Qt4 with Code::Blocks (QtNetwork, QTcpClient, ... etc)
« Reply #2 on: April 06, 2008, 06:45:46 pm »
Thanks for answer. Just trying QT Workbench, seems it working.

Offline Z.K.

  • Single posting newcomer
  • *
  • Posts: 8
Re: Using Qt4 with Code::Blocks (QtNetwork, QTcpClient, ... etc)
« Reply #3 on: June 01, 2008, 11:08:45 pm »
I do not know if this is your problem or not, but I had a similar problem which I finally narrowed down to my being on a power user account in windows XP. Even if permissions and securities of the folder are set to full access for the power user, it still fails to compile and I get errors similar to what you are getting; it can not see the QT files.   :)