在支持OpenSSL的Windows上构建PyQt5?
我正在尝试使用SSL支持构建PyQt5,但直到现在,我还没有成功 我所做的:在支持OpenSSL的Windows上构建PyQt5?,qt,ssl,openssl,pyqt5,qsslsocket,Qt,Ssl,Openssl,Pyqt5,Qsslsocket,我正在尝试使用SSL支持构建PyQt5,但直到现在,我还没有成功 我所做的: 使用OpenSSL支持重建Qt:OK configure.exe -static -debug-and-release -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -platform win32-g++ -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -
- 使用OpenSSL支持重建Qt:OK
configure.exe -static -debug-and-release -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -platform win32-g++ -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib mingw32-make
python configure.py -p win32-g++ mingw32-make mingw32-make install
python configure.py --spec=win32-g++ mingw32-make mingw32-make install
>>> from PyQt5.QtNetwork import QSslSocket >>> QSslSocket.supportsSsl() False
- 安装SIP:正常
configure.exe -static -debug-and-release -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -platform win32-g++ -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib mingw32-make
python configure.py -p win32-g++ mingw32-make mingw32-make install
python configure.py --spec=win32-g++ mingw32-make mingw32-make install
>>> from PyQt5.QtNetwork import QSslSocket >>> QSslSocket.supportsSsl() False
- 安装PyQt5:正常
configure.exe -static -debug-and-release -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -platform win32-g++ -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib mingw32-make
python configure.py -p win32-g++ mingw32-make mingw32-make install
python configure.py --spec=win32-g++ mingw32-make mingw32-make install
>>> from PyQt5.QtNetwork import QSslSocket >>> QSslSocket.supportsSsl() False
- 编辑
文件,在QtWebKitWidgets ModuleMetadata上添加configure.py
:'printsupport'
而不是'QtWebKitWidgets':ModuleMetadata(qmake_QT=['webkitwidgets','printsupport']),
'QtWebKitWidgets':ModuleMetadata(qmake_QT=['webkitwidgets']),
- 在
之后(或之前?)删除该行mingw32 make
从目标-strip C:$(安装\u ROOT)\Python34\pyuic5.bat
:安装\u pyuic5
- 编辑
- 测试:不正常
configure.exe -static -debug-and-release -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -platform win32-g++ -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib mingw32-make
python configure.py -p win32-g++ mingw32-make mingw32-make install
python configure.py --spec=win32-g++ mingw32-make mingw32-make install
>>> from PyQt5.QtNetwork import QSslSocket >>> QSslSocket.supportsSsl() False
https
URL,我会收到很多或SSL错误,例如:
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
提前谢谢你 问题解决了
ssleay32.dll
、libeay32.dll
和libssl32.dll
复制到Qt>mingw>bin文件夹(C:\Qt\Qt5.3.2\5.3\mingw482\u 32\bin
)qsslssocket.supportssl()
测试时看到一个大的True