QT https SSL support for static QT static program build - getting 'Protocol “https” is unknown'

和自甴很熟 提交于 2019-11-29 16:06:56

In spite of what configure indicates, you have not provided enough information to configure to let it link Qt with OpenSSL.

You need to link Qt with OpenSSL at the time it is being built. Pass the following arguments to configure (this is for Qt 5):

-openssl-linked
-I C:\OpenSSL-Win32\include
-L C:\OpenSSL-Win32\lib\VC\static
OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32 -lCrypt32"
OPENSSL_LIBS_DEBUG=-"lssleay32MTd -llibeay32MTd"
OPENSSL_LIBS_RELEASE="-lssleay32MT -llibeay32MT"

There's no need for any special parameters to be passed while building your project.

The above assumes a build from Shining Light Productions, the de-facto OpenSSL binary purveyor for Windows.

Josh Orenberg

I contacted Shining Light Productions, they say no static libraries for mingw. Also I passed -openssl-linked -I C:/OpenSSL-Win32/include -L C:/OpenSSL-Win32/lib to configure by editing QT's powershell script for static building with success (you just need the openssl dlls present with the .exe for it to work...).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!