[英]QSslSocket errors
In Qt 4.8 on Windows 7 Ultimate x64, when I try to use QNetworkAccessManager
to post()
something over the network: 在Windows 7 Ultimate x64上的Qt 4.8中,当我尝试使用QNetworkAccessManager
通过网络post()
某些内容时:
_net_acc_mgr.post(QNetworkRequest(QUrl(...)),
QByteArray(...));
I encounter the following run time errors: 我遇到以下运行时错误:
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
QSslSocket: cannot call unresolved function OPENSSL_add_all_algorithms_noconf
content-type missing in HTTP POST, defaulting to application/octet-stream
I clearly remember the same code worked couple of years ago. 我清楚地记得几年前使用过相同的代码。 But I forget which version of Qt I tried. 但是我忘记了尝试使用哪个版本的Qt。
Is there anything else require to work with QNetworkAccessManager
in Qt 4.8? 在Qt 4.8中使用QNetworkAccessManager
还有其他要求吗?
The QT runs on 32bit QT在32位上运行
In Windows 64bit the folder system32 does not have the DLLs required for OpenSSL , only there in sysWOW64 folder . 在Windows 64位系统中 ,文件夹system32没有OpenSSL所需的DLL ,只有sysWOW64文件夹中 。
To resolve this you will need to install the binary version of OpenSSL 32 . 要解决此问题,您将需要安装OpenSSL 32的二进制版本。
Download compiled for Windows (Update link): 下载针对Windows编译的文件(更新链接):
http://slproweb.com/download/Win32OpenSSL_Light-1_0_1g.exe http://slproweb.com/download/Win32OpenSSL_Light-1_0_1g.exe
Note: During install select the option "The OpenSSL binaries (/bin) directory" (Probably
C:\\OpenSSL-Win32
) 注意:在安装过程中,选择选项“ OpenSSL二进制(/ bin)目录”(可能是C:\\OpenSSL-Win32
)
After install copy DLLs (from C:\\OpenSSL-32
or %HOMEDRIVE%\\OpenSSL-32
) for release/debug project folder: 安装后,为发布/调试项目文件夹复制DLL(从C:\\OpenSSL-32
或%HOMEDRIVE%\\OpenSSL-32
):
Another option would be to use the Mingw 64bit , but do not know if this would be feasible with the QT (this case, if you can compile the application will run only on 64bit systems). 另一种选择是使用Mingw 64bit ,但不知道QT是否可行(这种情况,如果可以编译,则该应用程序将仅在64位系统上运行)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.