QT添加openssl的方法



Assuming Windows you can download its installation from Win32 OpenSSL Installation Project page. You need to download this one for 64-bit windows developing or this one for 32-bit. Just run the stup and every thing will be done easily. The default installation directory is : C:\OpenSSL-Win32
In Qt creator if want to link a library to your project you can just add this line to your .pro file(project file ) :

LIBS += -L/path/to -llibname

So here's what we do for this library( for example to link ubsec.lib )

LIBS += -LC:/OpenSSL-Win32/lib -lubsec

Pay attention to -L and -l.See this question. You don't even need to specify .lib at the end of the library name.

For including .h files add this line to your .pro file :

INCLUDEPATH += C:/OpenSSL-Win32/include

after that you can include a file like this :

#include <openssl/aes.h>
转自:http://stackoverflow.com/questions/14681012/how-to-include-openssl-in-qt-creator
PS:外国社区的人答题就是认真仔细啊!值得学习!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值