Results 1 to 2 of 2

Thread: Problems with external symbols compiling plug in for network client

  1. #1
    Join Date
    Feb 2010
    Posts
    14
    Qt products
    Qt4
    Platforms
    Windows

    Default Problems with external symbols compiling plug in for network client

    Hi, i want to write a plugin for my app to access network (LAN).
    I allready has succesfully coded Plugins, but i dont know much about network coding and read the tutorials and so on.
    On some point the compiler means he has a unresolved external symbol on QAbstractSocket::catchReadyRead(char *, __int64).

    Connection.obj:-1: error: Nicht aufgelöstes externes Symbol ""protected: virtual __int64 __thiscall QAbstractSocket::catchReadyRead(char *,__int64)" (?catchReadyRead@QAbstractSocket@@MAE_JPAD_J@Z)".

    I think this couldn't be because i have no method like this and i dont use such a method. I have commented out most of my stuff to get a compiled version to hunt the error down but i cant find the problem.The crazy thing is that i had this plugin running and get a connection to the server.

    Here is my class that i hvae derived from QTcpSocket. I think there must be the problem because it derives from QAbstractSocket.

    Qt Code:
    1. #ifndef GUICONNECTION_H
    2. #define GUICONNECTION_H
    3.  
    4. #include <QTcpSocket>
    5.  
    6. class Connection : public QTcpSocket
    7. {
    8. //Q_OBJECT
    9.  
    10. public:
    11. Connection(QObject * iParent = NULL);
    12.  
    13. private:
    14. enum ReadState
    15. {
    16. eNotReading,
    17. eReading
    18. };
    19.  
    20. bool mInitialized; //!< connect with server is initialized
    21.  
    22. //QDataStream mDataStream;
    23.  
    24. ReadState mReadState;
    25. qint64 mBytesToRead;
    26.  
    27. /*
    28.   private slots:
    29.   void catchReadyReadData();
    30.   void catchConnected();
    31.   void catchDisconnected();
    32.  
    33.   signals:
    34.   void newData(QByteArray & iByteArray);
    35.   */
    36. };
    37.  
    38. #endif // GUICONNECTION_H
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. #include "Connection.h"
    2.  
    3. Connection::Connection(QObject * iParent)
    4. : QTcpSocket(iParent)
    5. , mInitialized(false)
    6. //, mDataStream()
    7. , mReadState(eNotReading)
    8. , mBytesToRead(0)
    9. {
    10. //mDataStream.setVersion(QDataStream::Qt_4_6);
    11. //mDataStream.setDevice(this);
    12.  
    13. /*
    14.   connect(this, SIGNAL(readyRead()),
    15.   this, SLOT(catchReadyReadData()));
    16.  
    17.   connect(this, SIGNAL(connected()),
    18.   this, SLOT(catchConnected()));
    19.   connect(this, SIGNAL(disconnected()),
    20.   this, SLOT(catchDisconnected()));
    21.   */
    22. }
    23. /*
    24. void Connection::catchConnected()
    25. {
    26.   // send identification data
    27. }
    28.  
    29. void Connection::catchDisconnected()
    30. {
    31.   mInitialized = false;
    32. }
    33.  
    34. void Connection::catchReadyReadData()
    35. {
    36.   if(mReadState == eNotReading)
    37.   {
    38.   Q_ASSERT(mBytesToRead == 0); // must be zero here
    39.  
    40.   // first qint64 is expected size of data to read from server
    41.   // if we dont have them we wait
    42.   if(bytesAvailable() < (qint64)sizeof(quint64))
    43.   return;
    44.  
    45.   // update size
    46.   mDataStream >> mBytesToRead;
    47.   mReadState = eReading;
    48.   }
    49.  
    50.   if(mReadState == eReading)
    51.   {
    52.   Q_ASSERT(mBytesToRead); // must contain size of data to read
    53.  
    54.   // if we dont have reached expected buffer size we wait
    55.   if( bytesAvailable() < mBytesToRead)
    56.   return;
    57.  
    58.   // get data and emit them
    59.   QByteArray byteArray;
    60.   mDataStream >> byteArray;
    61.  
    62.   emit newData(byteArray);
    63.  
    64.   mReadState = eNotReading;
    65.   }
    66. }
    67. */
    To copy to clipboard, switch view to plain text mode 

    I have allready deleted all not needed files and rebuild whole plugin, but this wont work. (win32-msvc2008).

    Does the compiler caches some data, for faster rebuilding?

    thx for suggestions to solve the problem

    [Edit]
    Used Qt 4.6 with QtCreator but with win32-msvc2008 spec on WinXp

    FortuneClient and Network-Chat are also no longer Buildable. WTF have i made? I try reinstalling Qt.
    Last edited by Halcom; 4th May 2010 at 16:15.

  2. #2
    Join Date
    Feb 2010
    Posts
    14
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problems with external symbols compiling plug in for network client

    [Solved] Reinstallation of Qt solves the Problem.

Similar Threads

  1. windows static compiling - debug symbols
    By eleanor in forum Installation and Deployment
    Replies: 7
    Last Post: 30th December 2009, 19:48
  2. Multiply defined symbols found - compiling with VC++
    By bmahf in forum Installation and Deployment
    Replies: 1
    Last Post: 20th October 2009, 16:05
  3. Problems with korean symbols in file path
    By Raistlin in forum Qt Programming
    Replies: 5
    Last Post: 6th April 2008, 14:59
  4. Linking problems with multiply defined symbols
    By JimBrown in forum Qt Programming
    Replies: 5
    Last Post: 2nd March 2007, 17:48
  5. Replies: 11
    Last Post: 22nd March 2006, 20:06

Tags for this Thread

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.