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:外国社区的人答题就是认真仔细啊!值得学习!

http://blog.163.com/fafaly@126/blog/static/131693298201342994248895/


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM