win10+QT5.15+cryptopp562 完整配置开发

1、准备如下几项内容:

        a、WIN10环境下的QT5.15.2安装包,QTCreator对应版本安装。(自行安装)

        b、cryptopp562安装包下载,官网:https://www.cryptopp.com/,这里没选择最新的8.7是因为mingw-32编译后的库文件使用有问题,有错误,但是5.6用同样的方式编译就可以正常使用。

2、使用QT环境编译cryptopp562,解压源码包,命令行模式下:qmake -project生成 .Pro文件,修改内容:TEMPLATE = lib,
增加:

DEFINES += CRYPTOPPLIB_LIBRARY

DESTDIR=$PWD/bin

3、命令模式执行:

    qmake

    mingw32-make all

  注意:此处的 mingw32-make.exe文件要跟qtcreator开发环境下的项目编译环境一直,这样才能保证编译后的dll和a文件能正确调用。

编译无错误生成:libcryptopp562.a 和 cryptopp562.dll文件。

4、新建Qt开发项目,可以是widgets或者console程序,目录下新建目录(根据个人喜好):libs\cryptopp\include 和libs\cryptopp\lib。

6、拷贝crypto5.6源码目录下的所有h文件到上面的include目录。拷贝编译后的libcryptopp562.a 和 cryptopp562.dll文件到lib目录。

7、编辑程序项目pro文件,

增加:

HEADERS += \
    libs/cryptopp/include/3way.h \
    libs/cryptopp/include/adler32.h \
    libs/cryptopp/include/adv_simd.h \
    libs/cryptopp/include/aes.h \
    libs/cryptopp/include/aes_armv4.h \
    libs/cryptopp/include/algebra.h \
    libs/cryptopp/include/algparam.h \
    libs/cryptopp/include/allocate.h \
    libs/cryptopp/include/arc4.h \
    libs/cryptopp/include/argnames.h \
    libs/cryptopp/include/aria.h \
    libs/cryptopp/include/arm_simd.h \
    libs/cryptopp/include/asn.h \
    libs/cryptopp/include/authenc.h \
    libs/cryptopp/include/base32.h \
    libs/cryptopp/include/base64.h \
    libs/cryptopp/include/basecode.h \
    libs/cryptopp/include/bench.h \
    libs/cryptopp/include/blake2.h \
    libs/cryptopp/include/blowfish.h \
    libs/cryptopp/include/blumshub.h \
    libs/cryptopp/include/camellia.h \
    libs/cryptopp/include/cast.h \
    libs/cryptopp/include/cbcmac.h \
    libs/cryptopp/include/ccm.h \
    libs/cryptopp/include/chacha.h \
    libs/cryptopp/include/chachapoly.h \
    libs/cryptopp/include/cham.h \
    libs/cryptopp/include/channels.h \
    libs/cryptopp/include/cmac.h \
    libs/cryptopp/include/config.h \
    libs/cryptopp/include/config_align.h \
    libs/cryptopp/include/config_asm.h \
    libs/cryptopp/include/config_cpu.h \
    libs/cryptopp/include/config_cxx.h \
    libs/cryptopp/include/config_dll.h \
    libs/cryptopp/include/config_int.h \
    libs/cryptopp/include/config_misc.h \
    libs/cryptopp/include/config_ns.h \
    libs/cryptopp/include/config_os.h \
    libs/cryptopp/include/config_ver.h \
    libs/cryptopp/include/cpu.h \
    libs/cryptopp/include/crc.h \
    libs/cryptopp/include/cryptlib.h \
    libs/cryptopp/include/darn.h \
    libs/cryptopp/include/default.h \
    libs/cryptopp/include/des.h \
    libs/cryptopp/include/dh.h \
    libs/cryptopp/include/dh2.h \
    libs/cryptopp/include/dll.h \
    libs/cryptopp/include/dmac.h \
    libs/cryptopp/include/donna.h \
    libs/cryptopp/include/donna_32.h \
    libs/cryptopp/include/donna_64.h \
    libs/cryptopp/include/donna_sse.h \
    libs/cryptopp/include/drbg.h \
    libs/cryptopp/include/dsa.h \
    libs/cryptopp/include/eax.h \
    libs/cryptopp/include/ec2n.h \
    libs/cryptopp/include/eccrypto.h \
    libs/cryptopp/include/ecp.h \
    libs/cryptopp/include/ecpoint.h \
    libs/cryptopp/include/elgamal.h \
    libs/cryptopp/include/emsa2.h \
    libs/cryptopp/include/eprecomp.h \
    libs/cryptopp/include/esign.h \
    libs/cryptopp/include/factory.h \
    libs/cryptopp/include/fhmqv.h \
    libs/cryptopp/include/files.h \
    libs/cryptopp/include/filters.h \
    libs/cryptopp/include/fips140.h \
    libs/cryptopp/include/fltrimpl.h \
    libs/cryptopp/include/gcm.h \
    libs/cryptopp/include/gf256.h \
    libs/cryptopp/include/gf2_32.h \
    libs/cryptopp/include/gf2n.h \
    libs/cryptopp/include/gfpcrypt.h \
    libs/cryptopp/include/gost.h \
    libs/cryptopp/include/gzip.h \
    libs/cryptopp/include/hashfwd.h \
    libs/cryptopp/include/hc128.h \
    libs/cryptopp/include/hc256.h \
    libs/cryptopp/include/hex.h \
    libs/cryptopp/include/hight.h \
    libs/cryptopp/include/hkdf.h \
    libs/cryptopp/include/hmac.h \
    libs/cryptopp/include/hmqv.h \
    libs/cryptopp/include/hrtimer.h \
    libs/cryptopp/include/ida.h \
    libs/cryptopp/include/idea.h \
    libs/cryptopp/include/integer.h \
    libs/cryptopp/include/iterhash.h \
    libs/cryptopp/include/kalyna.h \
    libs/cryptopp/include/keccak.h \
    libs/cryptopp/include/lea.h \
    libs/cryptopp/include/lsh.h \
    libs/cryptopp/include/lubyrack.h \
    libs/cryptopp/include/luc.h \
    libs/cryptopp/include/mars.h \
    libs/cryptopp/include/md2.h \
    libs/cryptopp/include/md4.h \
    libs/cryptopp/include/md5.h \
    libs/cryptopp/include/mdc.h \
    libs/cryptopp/include/mersenne.h \
    libs/cryptopp/include/misc.h \
    libs/cryptopp/include/modarith.h \
    libs/cryptopp/include/modes.h \
    libs/cryptopp/include/modexppc.h \
    libs/cryptopp/include/mqueue.h \
    libs/cryptopp/include/mqv.h \
    libs/cryptopp/include/naclite.h \
    libs/cryptopp/include/nbtheory.h \
    libs/cryptopp/include/nr.h \
    libs/cryptopp/include/oaep.h \
    libs/cryptopp/include/oids.h \
    libs/cryptopp/include/osrng.h \
    libs/cryptopp/include/ossig.h \
    libs/cryptopp/include/padlkrng.h \
    libs/cryptopp/include/panama.h \
    libs/cryptopp/include/pch.h \
    libs/cryptopp/include/pkcspad.h \
    libs/cryptopp/include/poly1305.h \
    libs/cryptopp/include/polynomi.h \
    libs/cryptopp/include/ppc_simd.h \
    libs/cryptopp/include/pssr.h \
    libs/cryptopp/include/pubkey.h \
    libs/cryptopp/include/pwdbased.h \
    libs/cryptopp/include/queue.h \
    libs/cryptopp/include/rabbit.h \
    libs/cryptopp/include/rabin.h \
    libs/cryptopp/include/randpool.h \
    libs/cryptopp/include/rc2.h \
    libs/cryptopp/include/rc5.h \
    libs/cryptopp/include/rc6.h \
    libs/cryptopp/include/rdrand.h \
    libs/cryptopp/include/resource.h \
    libs/cryptopp/include/rijndael.h \
    libs/cryptopp/include/ripemd.h \
    libs/cryptopp/include/rng.h \
    libs/cryptopp/include/rsa.h \
    libs/cryptopp/include/rw.h \
    libs/cryptopp/include/safer.h \
    libs/cryptopp/include/salsa.h \
    libs/cryptopp/include/scrypt.h \
    libs/cryptopp/include/seal.h \
    libs/cryptopp/include/secblock.h \
    libs/cryptopp/include/secblockfwd.h \
    libs/cryptopp/include/seckey.h \
    libs/cryptopp/include/seed.h \
    libs/cryptopp/include/serpent.h \
    libs/cryptopp/include/serpentp.h \
    libs/cryptopp/include/sha.h \
    libs/cryptopp/include/sha1_armv4.h \
    libs/cryptopp/include/sha256_armv4.h \
    libs/cryptopp/include/sha3.h \
    libs/cryptopp/include/sha512_armv4.h \
    libs/cryptopp/include/shacal2.h \
    libs/cryptopp/include/shake.h \
    libs/cryptopp/include/shark.h \
    libs/cryptopp/include/simeck.h \
    libs/cryptopp/include/simon.h \
    libs/cryptopp/include/simple.h \
    libs/cryptopp/include/siphash.h \
    libs/cryptopp/include/skipjack.h \
    libs/cryptopp/include/sm3.h \
    libs/cryptopp/include/sm4.h \
    libs/cryptopp/include/smartptr.h \
    libs/cryptopp/include/sosemanuk.h \
    libs/cryptopp/include/speck.h \
    libs/cryptopp/include/square.h \
    libs/cryptopp/include/stdcpp.h \
    libs/cryptopp/include/strciphr.h \
    libs/cryptopp/include/tea.h \
    libs/cryptopp/include/threefish.h \
    libs/cryptopp/include/tiger.h \
    libs/cryptopp/include/trap.h \
    libs/cryptopp/include/trunhash.h \
    libs/cryptopp/include/ttmac.h \
    libs/cryptopp/include/tweetnacl.h \
    libs/cryptopp/include/twofish.h \
    libs/cryptopp/include/validate.h \
    libs/cryptopp/include/vmac.h \
    libs/cryptopp/include/wake.h \
    libs/cryptopp/include/whrlpool.h \
    libs/cryptopp/include/words.h \
    libs/cryptopp/include/xed25519.h \
    libs/cryptopp/include/xtr.h \
    libs/cryptopp/include/xtrcrypt.h \
    libs/cryptopp/include/xts.h \
    libs/cryptopp/include/zdeflate.h \
    libs/cryptopp/include/zinflate.h \
    libs/cryptopp/include/zlib.h 

INCLUDEPATH += $$PWD/libs/cryptopp/include
DEPENDPATH += $$PWD/libs/cryptopp/include

LIBS +=  -L$$PWD/libs/cryptopp/lib -llibcryptopp562

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

子建莫敌

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值