In a slot function of a class a want to call another function of this class.
When I do this, I got following exception at the linking process:
Code:
undefined reference to `ClientSocket::myDecodeTcpMsg(unsigned long, unsigned char*)' *** Exited with status: 2 ***
Here are some fragments of my Source Code:
Code:
void ClientSocket::readRequest() { char TcpBuffer[1500]; qint64 Size; qint64 result_code; dword dwMsgLength; Size = bytesAvailable(); result_code = read ((char *) TcpBuffer, Size); dwMsgLength = Size; myDecodeTcpMsg (dwMsgLength, (unsigned char *) TcpBuffer); }
Here is the slot function readRequest in which I want to call the function myDecodeTcpMsg(...)
Code:
connect(this, SIGNAL(readyRead()), this, SLOT(readRequest()));
Here is the Signal & Slot connection which "enables" the readRequest() function
Code:
{ Q_OBJECT public: void myDecodeTcpMsg(dword dwLength, byte* pbData); signals: void sendResponseSignal(); private slots: void readRequest(); private: quint16 nextBlockSize; };
The Headerfile looks like this!