使用 QSslSocket 时未解析的函数 [英] Unresolved Functions While Working With QSslSocket

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

问题描述

我尝试运行一个用 Qt 编写并使用 QSslSocket 的简单程序.

I tried to run a simple program that is written with Qt and uses QSslSocket.

我在安装了OpenSSL的Ubuntu 12.04机器上运行这个程序.

I'm running this program on a Ubuntu 12.04 machine with OpenSSL installed.

但我收到以下错误:

QSslSocket: cannot call unresolved function SSLv3_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

如何修复这些错误?

推荐答案

安装最新的 openSSL 版本.yum install openssl ,yum install libssl-dev..

Install the latest openSSL version. yum install openssl ,yum install libssl-dev..

并在您的 .pro 文件中添加 QT += 网络

And add QT += network in your .pro file

来源:http://codeblog.vurdalakov.net/2009/11/solution-qsslsocket-cannot-call.html

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

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