Results 1 to 3 of 3

Thread: Problem with Example

  1. #1
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    1

    Default Problem with Example

    Hi , i have problem with compile Chat ( example )

    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 chatdialog.o chatdialog.cpp
    In file included from chatdialog.h:28,
    from chatdialog.cpp:26:
    client.h:27:27: error: QAbstractSocket: No such file or directory
    client.h:29:24: error: QHostAddress: No such file or directory
    In file included from client.h:31,
    from chatdialog.h:28,
    from chatdialog.cpp:26:
    server.h:27:22: error: QTcpServer: No such file or directory
    server.h:32: error: expected class-name before ‘{’ token
    server.h:32: warning: ‘class Server’ has virtual functions but non-virtual destructor
    client.h:44: error: expected ‘,’ or ‘...’ before ‘&’ token
    client.h:44: error: ISO C++ forbids declaration of ‘QHostAddress’ with no type
    client.h:53: error: ‘QAbstractSocket’ has not been declared
    client.h:53: error: expected ‘,’ or ‘...’ before ‘socketError’
    client.h:62: error: ‘QHostAddress’ was not declared in this scope
    client.h:62: error: template argument 1 is invalid
    make: *** [chatdialog.o] Błąd 1

    ubuntu
    Last edited by jacek; 7th August 2007 at 16:13. Reason: changed [code] to [quote]

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem with Example

    You're missing the network module includes.
    They are in include/QtNetwork.

    Make sure that in the pro file you have QT += network.

    Regards

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

    michal88 (7th August 2007)

  4. #3
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    1

    Default Re: Problem with Example

    Thx for help.


    QT += network


Similar Threads

  1. Graphics view display problem.
    By kiranraj in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 08:08
  2. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 13:54
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 15:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 22:36
  5. Replies: 16
    Last Post: 7th March 2006, 16:57

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.