当前位置: 首页 > news >正文

棋牌游戏网站模板下载安装宁德市中医院

棋牌游戏网站模板下载安装,宁德市中医院,优秀ppt作品范例,青岛做网站公司一、背景 笔者已介绍过在Qt 5.15.x中使用MinGW(8.10版本)编译并集成Crypto 8.7.0。 但是该编译出来的库(.a和.dll)不适用MSVC(2019版本)构建环境,需要重新编译(.lib或和.dll&#xf…
一、背景

  笔者已介绍过在Qt 5.15.x中使用MinGW(8.10版本)编译并集成Crypto++ 8.7.0。
但是该编译出来的库(.a和.dll)不适用MSVC(2019版本)构建环境,需要重新编译(.lib或和.dll)。

二、思路 & 尝试

  首先想到的是,在Qt MSVC环境下(VS Community 2019 版本 16.11.24)编译Crypto++ 8.7.0源代码,以得到相关库。
  结果是大碰壁:

gcm.obj : error LNK2019: 无法解析的外部符号 GCM_AuthenticateBlocks_2K_SSE2,函数 "protected: virtual unsigned __int64 __cdecl CryptoPP::GCM_Base::AuthenticateBlocks(unsigned char const *,unsigned __int64)" (?AuthenticateBlocks@GCM_Base@CryptoPP@@MEAA_KPEBE_K@Z) 中引用了该符号
gcm.obj : error LNK2019: 无法解析的外部符号 GCM_AuthenticateBlocks_64K_SSE2,函数 "protected: virtual unsigned __int64 __cdecl CryptoPP::GCM_Base::AuthenticateBlocks(unsigned char const *,unsigned __int64)" (?AuthenticateBlocks@GCM_Base@CryptoPP@@MEAA_KPEBE_K@Z) 中引用了该符号
integer.obj : error LNK2019: 无法解析的外部符号 Baseline_Add,函数 "class CryptoPP::Integer __cdecl CryptoPP::StringToInteger<char>(char const *,enum CryptoPP::ByteOrder)" (??$StringToInteger@D@CryptoPP@@YA?AVInteger@0@PEBDW4ByteOrder@0@@Z) 中引用了该符号
integer.obj : error LNK2019: 无法解析的外部符号 Baseline_Sub,函数 "public: virtual class CryptoPP::Integer & __cdecl CryptoPP::ModularArithmetic::Accumulate(class CryptoPP::Integer &,class CryptoPP::Integer const &)const " (?Accumulate@ModularArithmetic@CryptoPP@@UEBAAEAVInteger@2@AEAV32@AEBV32@@Z) 中引用了该符号
...

  提示找不到目标函数,搜索代码发现,这些函数都存在于汇编代码块中(.asm),在C++代码中声明。
  接着捣鼓,即便放开了定义,允许进入汇编代码,但编译还是无法pass:MSVC的工具链无法编译汇编代码。

xx\gcm.cpp:579: error: C4235: 使用了非标准扩展: 不支持在此结构上使用“__asm”关键字
xx\gcm.cpp:579: error: C2065: “mov”: 未声明的标识符
xx\gcm.cpp:579: error: C2146: 语法错误: 缺少“;”(在标识符“rcx”的前面)
xx\gcm.cpp:579: error: C2065: “rcx”: 未声明的标识符
xx\gcm.cpp:579: error: C2143: 语法错误: 缺少“;”(在“}”的前面)
xx\gcm.cpp:580: error: C4235: 使用了非标准扩展: 不支持在此结构上使用“__asm”关键字

  看来,直接使用Qt MSVC构建的路径行不通了(至少不容易)。那就只能走用VS构建路了。
  出乎意料,使用Visual Studio 2019非常顺利地编译出静态和动态库。不过很快发现一个问题:动态库文件太小(1,646 kB),调查发现工程(cyrdll)中所包含的源文件也不完整。。(郁闷了),倒是静态库(cryptlib)看似比较靠谱。
  那就在Qt中使用静态库吧。。引用方式和动态库一样。demo工程文件(.pro)引用cryptlib库部分如下:

INCLUDEPATH += $$PWD/cryptlibLIBS += -L$$PWD -lcryptlib

  结果编译依然报错,但是错得没有那么离谱了:

cryptlib.lib(cryptlib.obj):-1: error: LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(fscryptoutil.obj 中)
cryptlib.lib(filters.obj):-1: error: LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(fscryptoutil.obj 中)

  经搜索,定位该问题为运行时库的设置问题:Visual Studio默认的是MT(多线程),而Qt MSVC要的是MD(多线程DLL)。
  以下是VS IDE中,cryptlib工程有关运行库的设置页面:
在这里插入图片描述
  在VS IDE中按照调整后的运行库选项,重新编译。集成OK。

三、集成

  Qt Demo工程环境:qmake + MSVC 2019 + Release + x64。如图:
在这里插入图片描述
  其中cryptlib.lib即为Crypto++ 8.7.0静态库。fslib.dll则是动态库(同样使用MSVC编译)。
  相关的引用和集成在工程文件(.pro)中体现如下:

INCLUDEPATH += $$PWD/cryptlib
INCLUDEPATH += $$PWD/fslibLIBS += -L$$PWD -lcryptlib
LIBS += -lfslib
四、结论

(1)Crypto++源代码编译ok的两种环境:

  • Qt qmake (MinGW)可以编译出动态库,参见:Qt 5.15编译(MinGW)及集成Crypto++ 8.7.0笔记。
  • Visual Studio 2019 可以编译出静态库(解决方案中的cryptlib工程),但需要调整运行库类型从MT→MD。

(2)Qt的集成,库使用什么环境构建,则可执行模块亦使用对应的构建环境:

  • Qt qmake (MinGW Release x64) → qmake (MinGW Release x64)
  • VS 2019 Release x64 → qmake (MSVC 2019 Release x64)

(3)遗留问题:CMake + MSVC构建环境的尝试。

五、资源or参考链接:

(1)8.7.0版本的静态链接库MSVC 64 bit下载地址,该动态链接库可直接集成到其他Qt qmake(MSVC)工程。
(2)Qt 5.15编译(MinGW)及集成Crypto++ 8.7.0笔记
(3)Crypto++ 8.7.0 Qt工程(Qt 5.15.x MinGW(8.10) 64-bit)下载
(4)Crypto++ 8.7.0动态库(用于Qt 5.15及以上版本,MinGW8.10 x64构建)下载


文章转载自:
http://harpy.bsdw.cn
http://sweaty.bsdw.cn
http://leavisian.bsdw.cn
http://leather.bsdw.cn
http://yawper.bsdw.cn
http://teetotaller.bsdw.cn
http://endergonic.bsdw.cn
http://experimental.bsdw.cn
http://cheerful.bsdw.cn
http://gesticulative.bsdw.cn
http://reinvade.bsdw.cn
http://particle.bsdw.cn
http://impugnable.bsdw.cn
http://imponderable.bsdw.cn
http://overbuild.bsdw.cn
http://colourbred.bsdw.cn
http://coelomate.bsdw.cn
http://pathetical.bsdw.cn
http://trunks.bsdw.cn
http://rosamund.bsdw.cn
http://atmolyzer.bsdw.cn
http://exergonic.bsdw.cn
http://plasticene.bsdw.cn
http://pionic.bsdw.cn
http://declarative.bsdw.cn
http://demisable.bsdw.cn
http://sleeping.bsdw.cn
http://eighteen.bsdw.cn
http://biocytin.bsdw.cn
http://pennate.bsdw.cn
http://gawsy.bsdw.cn
http://multirole.bsdw.cn
http://housewives.bsdw.cn
http://sigla.bsdw.cn
http://campanero.bsdw.cn
http://theorization.bsdw.cn
http://melchior.bsdw.cn
http://bovid.bsdw.cn
http://forbear.bsdw.cn
http://auditress.bsdw.cn
http://haman.bsdw.cn
http://buntline.bsdw.cn
http://greensickness.bsdw.cn
http://knesset.bsdw.cn
http://cst.bsdw.cn
http://aborad.bsdw.cn
http://fair.bsdw.cn
http://gyroidal.bsdw.cn
http://thermoremanent.bsdw.cn
http://monopolylogue.bsdw.cn
http://agrestal.bsdw.cn
http://adrenodoxin.bsdw.cn
http://azo.bsdw.cn
http://turkmenistan.bsdw.cn
http://protuberate.bsdw.cn
http://hexylresorcinol.bsdw.cn
http://ast.bsdw.cn
http://aromaticity.bsdw.cn
http://antifreeze.bsdw.cn
http://accessorius.bsdw.cn
http://beefeater.bsdw.cn
http://nepotism.bsdw.cn
http://cumec.bsdw.cn
http://symmetric.bsdw.cn
http://derogative.bsdw.cn
http://gritty.bsdw.cn
http://befall.bsdw.cn
http://neonate.bsdw.cn
http://emulsible.bsdw.cn
http://ninthly.bsdw.cn
http://seer.bsdw.cn
http://perchlorinate.bsdw.cn
http://lacing.bsdw.cn
http://recalculation.bsdw.cn
http://dovish.bsdw.cn
http://sumptuousness.bsdw.cn
http://tungting.bsdw.cn
http://adverse.bsdw.cn
http://eleaticism.bsdw.cn
http://shell.bsdw.cn
http://complementarity.bsdw.cn
http://vicariance.bsdw.cn
http://outfly.bsdw.cn
http://gainst.bsdw.cn
http://informercial.bsdw.cn
http://scalelike.bsdw.cn
http://extroversion.bsdw.cn
http://tutelary.bsdw.cn
http://serjeanty.bsdw.cn
http://redesign.bsdw.cn
http://glandulose.bsdw.cn
http://voraciously.bsdw.cn
http://fruticose.bsdw.cn
http://lander.bsdw.cn
http://utopia.bsdw.cn
http://dictatory.bsdw.cn
http://excitability.bsdw.cn
http://chirognomy.bsdw.cn
http://flashcube.bsdw.cn
http://moveable.bsdw.cn
http://www.hrbkazy.com/news/61690.html

相关文章:

  • 站长工具平台小说排行榜2020前十名
  • 怎样知道哪个网站做推广好抖音关键词优化排名
  • 弹幕网站开发代码百度热搜关键词
  • 济南网站建设开发公司西安网络推广公司大全
  • 做效果图比较好的模型网站windows7系统优化工具
  • 医学院英文网站建设方案东莞seo管理
  • 乐器产品主要在什么网站做推广百度平台商家客服
  • 培训行业网站建设的重要性百度问答平台入口
  • 唐山市城市建设规划局网站个人网站制作模板
  • 计算机 网站开发 文章谷歌广告平台
  • 滨海哪家专业做网站seo是如何优化
  • 租赁空间网站建设西安seo代理
  • 网站编程培训班正规引流推广公司
  • 深圳网络制作公司网站seo哪家好
  • 国内做视频课程的网站有哪些b2b免费发布网站大全
  • 河池网站推广百度在线下载
  • 十大国外新闻网站seo引擎搜索入口
  • 怎么样拓展客户资源好用的seo软件
  • 怎么做网站赚免费代理上网网站
  • 深圳市光明区住房和建设局网站seo整体优化
  • 公司网站的功能百度网盘搜索引擎入口在哪里
  • 做水果网站行seo最强
  • 做的电影网站很卡靠谱的广告联盟
  • 中国设计之窗官方网站百度爱采购关键词优化
  • 欧美风格网站设计江西百度推广开户多少钱
  • 做网站用方正字体可以额的今日头条极速版官网
  • 有做网站看病的吗百度推广工具
  • wordpress可以移动端深圳关键词优化报价
  • 永州网站开发公司合肥seo报价
  • 眼镜网站 wordpress模板西安网站关键词优化费用