[Qt-creator] QSslSocket with Windows All-in-one Install
Gilles Valette
gilles.valette at univ-reims.fr
Thu Mar 5 19:08:24 CET 2009
Message de Scott Morgan <blumf at blueyonder.co.uk>:
> Using the QT SDK release for Windows with QT Creator. The following
> fails to compile:
>
> #include <QtCore/QCoreApplication>
> #include <QtNetwork>
> #include <QSslSocket>
>
> int main(int argc, char *argv[])
> {
> QCoreApplication a(argc, argv);
>
> QSslSocket ssl;
>
> return a.exec();
> }
>
> With this message:
>
> main.cpp: In function `int main(int, char**)':
> main.cpp:9: error: `QSslSocket' was not declared in this scope
> main.cpp:9: error: expected `;' before "ssl"
> main.cpp:9: warning: unused variable 'QSslSocket'
> mingw32-make[1]: *** [debug/main.o] Error 1
>
> In Linux versions of QT Creator and a source based builds of QT (using
> MSVC, so not working with QT-C) the code compiles fine.
>
> I initially thought this was an omission from the Windows release, but
> the demo executables bundled with the QT SDK have the secure socket demo
> and it runs fine.
>
Hi,
I can recreate this issue. Browsing the Qt-sources I found that it is
because the symbol QT_NO_OPENSSL is not defined.
If I refer to this topic:
http://www.qtcentre.org/forum/f-qt-programming-2/t-qssl-19222-post94842.html
you have to rebuild your Qt with OpenSSL.
Hope this helps.
Gilles
More information about the Qt-creator-old
mailing list