QSslSocket:无法调用未解决的函数 [英] QSslSocket: cannot call unresolved function

查看:585
本文介绍了QSslSocket:无法调用未解决的函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Qt Creator 4.2.0运行Qt 5.7.1(MSVC 2015,32位)。我有一个 QSslSocket 问题。我收到以下错误:

I am running Qt 5.7.1 (MSVC 2015, 32 bit) with Qt Creator 4.2.0. I have a problem with QSslSocket. I am getting 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

我去了以下位置 openssl github 并下载了zip文件。我已经将 libeay32.dll和 ssleay32.dll文件移到了我的发行目录中,但仍然出现这些错误。有没有人得到 QSslSocket 的工作,可以给我一些使套接字正常工作的步骤,或者有任何建议?

I have gone to the following location openssl github and downloaded the zip file. I have moved the "libeay32.dll" and "ssleay32.dll" files to my release directory, and I am still getting these errors. Is there anyone who has gotten the QSslSocket working that can give me steps to get the socket working or has any suggestions?

推荐答案

您需要手动添加对OppenSSL的支持,因为android放弃了对它的支持,而我使用的是QT 5.9,它并不能为您带来
,因此您的任务是创建openSSL库

You need to Add support to OppenSSL manually, since android dropped the support of it, and i am using QT 5.9 and its not make it for you so its your mission to create openSSL lib

您可以在此处直接下载
https://wiki.openssl.org/index.php/二进制文件

You can download it directly here https://wiki.openssl.org/index.php/Binaries

或此处 https://indy.fulgan.com/SSL/

和然后将这些文件复制并包含到您的项目中

and then copy these filed and include them to your project

libcrypto.so
libssl.so

应该可以正常工作

或者您可以生成 libcrypto.so libssl.so 使用此脚本
,只是只需
https://github.com/ekke/android-openssl -qt

Or you can generate your libcrypto.so and libssl.so using this script , just follow it step by step https://github.com/ekke/android-openssl-qt

这篇关于QSslSocket:无法调用未解决的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆