NEED HELP!!! about qsslsocket
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---
Quote:
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:
Code:
#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;
};
Re: NEED HELP!!! about qsslsocket
Most likely you need to install an OpenSSL development package, including necessary header and library files. Make sure to examine the configure output (the Start-menu link runs configure) and look for something like:
Quote:
OpenSSL support ............... <yes/no>
Re: NEED HELP!!! about qsslsocket
oh,great thx,i got it,i modify the qtvars.bat,add openssl support,it now works.
THANK YOU VERY MUCH!!!