使用QSslSocket时无法解析的功能

问题描述:

我试图运行一个用Qt编写的简单程序,并在其中使用了QSslSocket. 我正在安装了 OpenSSL 的Ubuntu 12.04计算机上运行此程序. 但是我遇到了以下错误:

I tried to run a simple program that is written with Qt and QSslSocket is used in. I'm running this program on a Ubuntu 12.04 machine with OpenSSL installed. But I got the following errors:

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 opensslyum 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