Integrate Crypto++ code to Qt Application In Linux

懵懂的女人 提交于 2019-12-12 01:18:14

问题


I try to use this example code of using AES algorithm. I am new to qt and linux and try to figure out how should I use this library.

I downloaded the file Crypto++ 5.0 from here and unzip it . Now I have direcory in ~/Downloads/crypto with many cpp and header files but I dont know what's next. which file should I compile? how can I integrate this to small Qt project? If I copy the code from the link , the compiler cant find all the include files (which is make sense). so what i need to do to run this small example?

I use Qt 5.4.1, th compiler is g++


回答1:


I found the blog describing Crypto++, Qt and Linux:

https://inphamousdevelopment.wordpress.com/2011/05/06/crypto-and-linux/

The main idea is that you should not using downloaded files but use terminal:

sudo apt-get install libcrypto++8 libcrypto++8-dbg libcrypto++-dev

To add library to the project use the following:

LIBS += -L/usr/lib/crypto++ -lcrypto++
INCS += -I/usr/include/crypto++

See the first link for more details, hope it helps.



来源:https://stackoverflow.com/questions/31660366/integrate-crypto-code-to-qt-application-in-linux

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!