Hi,everyone,now I am trying to write some code using QT4,but I got the following problem.
I installed qt-win-opensource-4.3.4-mingw.exe,and I need to use QSslSocket,it works fine
But currently I got some problem,so I have to debug it,so I have to :
"Qt 4.3.4 (Build Debug Libraries)" founded in the start menu.
and recompile the qt to generate debug libs.
AND THE error come out---
e" -I"." -I"e:\Qt\4.3.4\include\ActiveQt" -I"debug" -I"." -I"..\..\Qt\4.3.4\mks
ecs\win32-g++" -o debug\main.o main.cc
n file included from main.cc:13:
sl/QSslImpl.h:35: error: ISO C++ forbids declaration of `QSslSocket' with no ty
e
sl/QSslImpl.h:35: error: expected `;' before '*' token
ingw32-make[1]: *** [debug/main.o] Error 1
IT SEEMS THATS AFTER COMPILING DEBUG LIBS,THE QSSLSOCKET NO LONGER
AVAIBLE,I REAALY DONNOT KNOW WHY?AND I TRY TO COMPILE WITH:
MAKE -F Makefile.release IT ALSO NO LONGER COMPILED SUCCESFULLY.
I NEED YOU HELP,GREAT THANKS!!!!
MY CLASS DEF HERE:
#ifndef _QSSLIMPL_H
#define _QSSLIMPL_H
#include <QObject>
#include <QtNetwork>
#include <QAbstractSocket>
#include <QSslSocket>
#include <QSslCertificate>
#include <QRegExp>
#include "common\common.h"
#include "xml/XMPPBase.h"
{
Q_OBJECT //add this to support qt signals&slot merchanism
public:
QSslImpl();
~QSslImpl();
qint8 connectedTcp();
qint8 switchToTLS();
qint8 sendRaw(const char * data);
qint8 sendStanza(const char *data);
public slots:
void readData();
void connected();
private:
QSslSocket *qsslSocket;
qint8 socketState;
qint8 xmppState;
qint64 recvLen;
};
#ifndef _QSSLIMPL_H
#define _QSSLIMPL_H
#include <QObject>
#include <QtNetwork>
#include <QAbstractSocket>
#include <QSslSocket>
#include <QSslCertificate>
#include <QRegExp>
#include "common\common.h"
#include "xml/XMPPBase.h"
class QSslImpl:public QObject
{
Q_OBJECT //add this to support qt signals&slot merchanism
public:
QSslImpl();
~QSslImpl();
qint8 connectedTcp();
qint8 switchToTLS();
qint8 sendRaw(const char * data);
qint8 sendStanza(const char *data);
public slots:
void readData();
void displayError(QAbstractSocket::SocketError socketError);
void connected();
private:
QTcpSocket *qtcpSocket;
QSslSocket *qsslSocket;
QByteArray *recvBuffer;
qint8 socketState;
qint8 xmppState;
qint64 recvLen;
};
To copy to clipboard, switch view to plain text mode
Bookmarks