[Qt Development Notes] When Qt uses QSslSocket, there is an error solution about openssl call

1. Error description

When the Qt program is running, the following error report of QSslSocket occurs. The approximate content of the error report is qt.network.ssl: QSslSocket: cannot call unresolved function XXX.

Write picture description here

2. Error analysis

The error reported here is very intuitive. It should be that the program lacks the dynamic loading library related to openssl when the program is running. Check the relevant information, the two library files libeay32.dll and ssleay32.dll are missing .

3. Solutions

I have considered downloading the relevant library or source code from the openssl official website to compile, but I am not sure about the openssl version currently used by Qt. I wanted to find the existing library files in the system, searched with the search tool, and found that there are libeay32.dll and ssleay32.dll in the installation directory of QtCreator.

Copy the libeay32.dll and ssleay32.dll library files in the QtCreator directory to the bin directory of the Qt library, or directly copy them to the running directory of the program, which is convenient for packaging and publishing.

Guess you like

Origin blog.csdn.net/qq_37354286/article/details/81905489