Results 1 to 4 of 4

Thread: includes problems

  1. #1
    Join Date
    Apr 2010
    Posts
    17
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default includes problems

    Hello everybody!
    I work on Windows Seven with Qt 4.6.3

    I 've got some files of a project found on the internet and I tried to create a new projet based on those files, so I 've created a .pro file and added all the files. But after compiling, I've got a problem on a library called qLocalSocket. The compile output give me the error : "No such file or directory", however, I 've got this line on my file: # include <QLocalSocket> so it should works...
    Moreover I've well changed the Path of qmake.exe on system...
    I've searched on the web a similar problem without succes

    Is there something to do i've missed or what?
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: includes problems

    A header file only contains a declaration of classes and functions. To use them you need to link your program against a library that provides implementations of those symbols, in your case probably the QtNetwork library.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    valy12 (12th April 2011)

  4. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: includes problems

    QLocalSocket class is part of the QtNetwork module of Qt framework and to tell the tools to link network module with your application you will need to add this line in your .pro file:
    Qt Code:
    1. QT += network
    To copy to clipboard, switch view to plain text mode 

  5. The following user says thank you to Zlatomir for this useful post:

    valy12 (12th April 2011)

  6. #4
    Join Date
    Apr 2010
    Posts
    17
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: includes problems

    Ok, it works. Thanks for reply

Similar Threads

  1. includes from headers
    By BadKnees in forum Qt Programming
    Replies: 2
    Last Post: 31st March 2009, 08:55
  2. qFromLittleEndian what includes to use?
    By nunyabeezwax in forum Qt Programming
    Replies: 3
    Last Post: 14th August 2008, 14:36
  3. Doubt about includes
    By xEsk in forum Newbie
    Replies: 2
    Last Post: 15th November 2007, 20:20
  4. qmake default includes
    By Gopala Krishna in forum Installation and Deployment
    Replies: 5
    Last Post: 17th July 2007, 20:47
  5. How to use C++ includes?
    By jochen_r in forum Newbie
    Replies: 4
    Last Post: 9th January 2006, 14:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.