QSslSocket: cannot call unresolved function

I am using Qt 5.7.1 (MSVC 2015, 32 bit) with Qt Creator 4.2.0. I have a problem with QSslSocket. I get the following errors:

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
qt.network.ssl: QSslSocket: cannot call unresolved function ERR_get_error

I went to the following OpenSSL GitHub folder and downloaded the ZIP file. I have moved the files "libeay32.dll" and "ssleay32.dll" to the release directory, and still get these errors. Is there anyone who has a working one QSslSocketthat can give me steps to make the socket work, or have any suggestions?

+10
source share
5 answers

OppenSSL , , QT 5.9, openSSL lib

https://wiki.openssl.org/index.php/Binaries

https://indy.fulgan.com/SSL/

libcrypto.so
libssl.so

libcrypto.so libssl.so, script , https://github.com/ekke/android-openssl-qt

+2

Google. , libeay32.dll ssleay32.dll. "", PATH , .

Qt Creator, DLL bin Qt, , DLL .

DLL OpenSSL, Qt. , Qt 5.4, QSslSocket::sslLibraryBuildVersionString(). (: fooobar.com/questions/844599/...)

, 64- 64- DLL, 32- 32- DLL, , .


:

, . .

+7

: 'C:\Qt\Tools (msvc/mingw) {version}\bin'

C:\Qt\Tools\(msvc|mingw)\opt\bin\libeay32.dll
C:\Qt\Tools\(msvc|mingw)\opt\bin\ssleay32.dll
+6

, MSVC2017 x64:

  1. 1.0 (Win64 OpenSSL v1.0.2r Light) : https://slproweb.com/products/Win32OpenSSL.html
  2. DLL bin OpenSSL.
  3. And then copy libeay32.dll and ssleay32.dll from the OpenSSL bin folder to:{Your_Qt_Folder}/{Qt_version}/msvc2017_64/bin
0
source

I solved this problem.

  1. Download and install v1.0.2s << - ( libeay32.dll, ssleay32.dll) at https://slproweb.com/products/Win32OpenSSL.html.

  2. Copy libeay32.dllandssleay32.dll

  3. Locate QtNetwork*.dllQt in your folder. In my case, the way is this C:\Qt\Tools\QtCreator\bin.

  4. Insert libeay32.dlland ssleay32.dllin C:\Qt\Tools\QtCreator\bin.

0
source

Source: https://habr.com/ru/post/1667794/


All Articles