Trying to run a simple example of parsing from Wikipedia, but it gives an error:

qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_new qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init qt.network.ssl: QSslSocket: cannot call unresolved function ERR_get_error Network Error: "Error creating SSL context ()" qt.network.ssl: QSslSocket: cannot call unresolved function ERR_get_error Response Received: "" 

I use Windows 8 and mingw32-make. I tried to search for libraries: LIBS + = -libeay32 LIBS + = -ssleay32 and connect. Downloaded here . But it still does not work.

The example itself:

 #include <QCoreApplication> #include <QNetworkAccessManager> #include <QNetworkReply> #include <QNetworkRequest> #include <QDebug> #include <QTextStream> #include <QSslError> int main(int argc, char *argv[]) { QCoreApplication application(argc, argv); QNetworkAccessManager qnam; const QNetworkRequest wikireq(QUrl(QStringLiteral("https://en.wikipedia.org/w/api.php?action=query&format=json&titles=lemon"))); QNetworkReply* wikirep = qnam.get(wikireq); QObject::connect(wikirep,&QNetworkReply::finished,[wikirep]()->void{ QTextStream repStream(wikirep); qDebug() << "Response Received:\n" << repStream.readAll(); wikirep->deleteLater(); }); QObject::connect(wikirep,QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error),[wikirep]()->void{ qDebug() << "Network Error:\n" << wikirep->errorString(); wikirep->deleteLater(); }); QObject::connect(wikirep,&QNetworkReply::sslErrors,[wikirep](const QList<QSslError> &errors)->void{ qDebug() << "SSL Errors:"; for(auto&& err : errors) qDebug() << err.errorString(); wikirep->deleteLater(); }); return application.exec(); } 
  • @Unick It did not help, besides, I do not use MSVC ++ - Ivan Triumphov
  • Maybe you should specify the OS, then the copier is in question. - Unick
  • @Unick Yes now - Ivan Triumphov pm

1 answer 1

The link helped me. I just installed what was required there and added two libraries to the pro file from the bin folder of the installed application.

 LIBS += -Llibeay32 -Lssleay32