1、准备如下几项内容:
a、WIN10环境下的QT5.15.2安装包,QTCreator对应版本安装。(自行安装)
b、Crypto++8.6安装包下载,官网:https://www.cryptopp.com/,这里没选择最新的8.7是因为mingw-32编译后的库文件使用有问题,有错误,但是8.6用同样的方式编译就可以正常使用。
2、使用QT环境编译CryptoPP 8.6,解压源码包,命令行模式下:qmake -project生成 .Pro文件,修改内容:TEMPLATE = lib,增加:DEFINES += CRYPTOPPLIB_LIBRARY,QMAKE_CXXFLAGS += "-msse4.2"
QMAKE_CXXFLAGS += "-mavx"
QMAKE_CXXFLAGS += "-mavx2"
QMAKE_CXXFLAGS += "-mpclmul"
QMAKE_CXXFLAGS += "-maes"
QMAKE_CXXFLAGS += "-msha"
LIBS += -lws2_32
3、删除无用信息:
TestPrograms/test_32bit.cpp \
TestPrograms/test_64bit.cpp \
TestPrograms/test_arm_acle_header.cpp \
TestPrograms/test_arm_aes.cpp \
TestPrograms/test_arm_asimd.cpp \
TestPrograms/test_arm_crc.cpp \
TestPrograms/test_arm_neon.cpp \
TestPrograms/test_arm_neon_header.cpp \
TestPrograms/test_arm_pmull.cpp \
TestPrograms/test_arm_sha1.cpp \
TestPrograms/test_arm_sha256.cpp \
TestPrograms/test_arm_sha3.cpp \
TestPrograms/test_arm_sha512.cpp \
TestPrograms/test_arm_sm3.cpp \
TestPrograms/test_arm_sm4.cpp \
TestPrograms/test_asm_mixed.cpp \
TestPrograms/test_cxx.cpp \
TestPrograms/test_cxx11.cpp \
TestPrograms/test_cxx11_alignas.cpp \
TestPrograms/test_cxx11_alignof.cpp \
TestPrograms/test_cxx11_assert.cpp \
TestPrograms/test_cxx11_atomic.cpp \
TestPrograms/test_cxx11_auto.cpp \
TestPrograms/test_cxx11_constexpr.cpp \
TestPrograms/test_cxx11_deletefn.cpp \
TestPrograms/test_cxx11_enumtype.cpp \
TestPrograms/test_cxx11_initializer.cpp \
TestPrograms/test_cxx11_lambda.cpp \
TestPrograms/test_cxx11_noexcept.cpp \
TestPrograms/test_cxx11_nullptr.cpp \
TestPrograms/test_cxx11_staticinit.cpp \
TestPrograms/test_cxx11_sync.cpp \
TestPrograms/test_cxx11_vartemplates.cpp \
TestPrograms/test_cxx14.cpp \
TestPrograms/test_cxx17.cpp \
TestPrograms/test_cxx17_assert.cpp \
TestPrograms/test_cxx17_exceptions.cpp \
TestPrograms/test_cxx98_exception.cpp \
TestPrograms/test_glibc.cpp \
TestPrograms/test_newlib.cpp \
TestPrograms/test_ppc_aes.cpp \
TestPrograms/test_ppc_altivec.cpp \
TestPrograms/test_ppc_power7.cpp \
TestPrograms/test_ppc_power8.cpp \
TestPrograms/test_ppc_power9.cpp \
TestPrograms/test_ppc_sha.cpp \
TestPrograms/test_ppc_vmull.cpp \
TestPrograms/test_pthreads.cpp \
TestPrograms/test_x86_aes.cpp \
TestPrograms/test_x86_avx.cpp \
TestPrograms/test_x86_avx2.cpp \
TestPrograms/test_x86_avx512.cpp \
TestPrograms/test_x86_clmul.cpp \
TestPrograms/test_x86_