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

网站怎样赚钱站长工具权重查询

网站怎样赚钱,站长工具权重查询,物流的网站模板,赣州企业做网站cryptopp是一个开源免费的算法库,这个库的用途非常多,我常常用这个库来做加解密的运算。这段时间在折腾UE5.4.4,学习的过程中,准备把cryptopp移植到游戏的工程内,但UE的编译环境和VS的编译环境完全不同,能在…

cryptopp是一个开源免费的算法库,这个库的用途非常多,我常常用这个库来做加解密的运算。这段时间在折腾UE5.4.4,学习的过程中,准备把cryptopp移植到游戏的工程内,但UE的编译环境和VS的编译环境完全不同,能在VS下顺利编译的cryptopp代码,移植之后,全在报错,错误千奇百怪,我尝试了修复这些错误,结果有一些错是根本修复不了的。我列举一些典型的错误如下:

12>D:\UEProject\Dawn\Source\cryptopp\code\algebra.cpp(1): error : Expected algebra.h to be first header included.
12>D:\UEProject\Dawn\Source\cryptopp\code\algparam.cpp(1): error : Expected algparam.h to be first header included.
12>D:\UEProject\Dawn\Source\cryptopp\code\allocate.cpp(1): error : Expected allocate.h to be first header included.
12>D:\UEProject\Dawn\Source\cryptopp\code\arc4.cpp(1): error : Expected arc4.h to be first header included.
12>D:\UEProject\Dawn\Source\cryptopp\code\aria.cpp(1): error : Expected aria.h to be first header included.
12>D:\UEProject\Dawn\Source\cryptopp\code\asn.cpp(1): error : Expected asn.h to be first header included.
12>D:\UEProject\Dawn\Source\cryptopp\code\authenc.cpp(1): error : Expected authenc.h to be first header included.
12>D:\UEProject\Dawn\Source\cryptopp\code\base32.cpp(1): error : Expected base32.h to be first header included.
12>D:\UEProject\Dawn\Source\cryptopp\code\base64.cpp(1): error : Expected base64.h to be first header included.
12>D:\UEProject\Dawn\Source\cryptopp\code\basecode.cpp(1): error : Expected basecode.h to be first header included.
12>D:\UEProject\Dawn\Source\cryptopp\code\blake2.cpp(1): error : Expected blake2.h to be first header included.
12>D:\UEProject\Dawn\Source\cryptopp\code\blowfish.cpp(1): error : Expected blowfish.h to be first header included.


1>D:\UEProject\Dawn\Intermediate\Build\Win64\x64\UnrealGame\DebugGame\cryptopp\Definitions.cryptopp.h(19): note: 参见“CRYPTOPP_API”的前一个定义
1>D:\UEProject\Dawn\Source\cryptopp\code\config_misc.h(121): error C4668: 没有将“CRYPTOPP_GCC_VERSION”定义为预处理器宏,用“0”替换“#if/#elif”
1>D:\UEProject\Dawn\Source\cryptopp\code\config_misc.h(121): error C4668: 没有将“CRYPTOPP_LLVM_CLANG_VERSION”定义为预处理器宏,用“0”替换“#if/#elif”
1>D:\UEProject\Dawn\Source\cryptopp\code\config_misc.h(122): error C4668: 没有将“CRYPTOPP_APPLE_CLANG_VERSION”定义为预处理器宏,用“0”替换“#if/#elif”
1>D:\UEProject\Dawn\Source\cryptopp\code\config_misc.h(194): error C4668: 没有将“CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE”定义为预处理器宏,用“0”替换“#if/#elif”
1>D:\UEProject\Dawn\Source\cryptopp\code\misc.h(644): error C4668: 没有将“CRYPTOPP_GCC_VERSION”定义为预处理器宏,用“0”替换“#if/#elif”
1>D:\UEProject\Dawn\Source\cryptopp\code\misc.h(644): error C4668: 没有将“CRYPTOPP_LLVM_CLANG_VERSION”定义为预处理器宏,用“0”替换“#if/#elif”
1>D:\UEProject\Dawn\Source\cryptopp\code\misc.h(645): error C4668: 没有将“CRYPTOPP_APPLE_CLANG_VERSION”定义为预处理器宏,用“0”替换“#if/#elif”

这些错有些是UBT的配置问题,有些是作者对C++宏定义本身写法不够严谨引起的,还有一些离谱的错误,应该和编译环境有关。

这些错误完全无法解决,所以我想了一个办法,就是在外部用VS2022直接编译cryptopp工程,然后生成cryptopp的库文件,通过UE Moudle的方式,将库引入UE5.4.4。

具体方法如下:

第一步,编译cryptopp,打开cryptopp目录中cryptest.sln这个工程文件,然后打开项目cryptlib这个工程的属性,将C/C++下的代码生成中,运行库一栏选择为MD方式(多线程DLL)。然后编译整个库。得到cryptopp.lib文件。

第二步,把crypto作为一个moudle引入到UE项目内。在UE工程的source目录下,创建cryptopp目录。并且在cryptopp内继续创建inc和lib目录。将相应的文件拷贝到对应目录。

第三步,在cryptopp目录下创建cryptopp.Build.cs文件。内容如下:

using System.IO;
using UnrealBuildTool;public class cryptopp : ModuleRules
{public cryptopp(ReadOnlyTargetRules Target) : base(Target){//PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;Type = ModuleType.External;PublicIncludePaths.AddRange(new string[] {// ... add public include paths required here ...});PrivateIncludePaths.AddRange(new string[] {// ... add other private include paths required here ...});PublicDependencyModuleNames.AddRange(new string[]{// "Core",// ... add other public dependencies that you statically link with here ...});PrivateDependencyModuleNames.AddRange(new string[]{//"CoreUObject",//"Engine",// "Slate",// "SlateCore",// ... add private dependencies that you statically link with here ...	});DynamicallyLoadedModuleNames.AddRange(new string[]{// ... add any modules that your module loads dynamically here ...});// 添加导入库或静态库PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "lib", "cryptlib_Release.lib" ));}
}

主要是把Type改成ModuleType.External, 告诉UBT这个模块是第三方库,不需要编译,然后再设置好需要导入的库文件和路径。

最后一步,在UE主模块的编译脚本内,添加要引入的模块,不加入的话会报链接找不到符号的错误。

		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput", "cryptopp" });

加入之后,重新刷新vs工程,然后再编译工程,就可以使用cryptopp了。

http://www.tj-hxxt.cn/news/9175.html

相关文章:

  • 网站首页设计布局方式口碑营销的产品
  • 杭州 网站建设公司2022双11各大电商平台销售数据
  • 免费网站平台网站软件免费下载
  • 中国旅游网站建设现状及发展趋势分析品牌策略怎么写
  • 网站功能介绍百度推广天天打骚扰电话
  • 中山网站建设方案买友情链接有用吗
  • 浅析b2c电子商务网站的建设如何学会推广和营销
  • 官网网站建设网络营销外包推广定制公司
  • 科技资讯网站开发百度灰色关键词代发
  • 网站建设的项目方案模板想要推广网页正式版
  • 如何在微信内做网站项目推广方式有哪些
  • 免费logo设计软件手机版许昌网站seo
  • 响应式网站的优缺点软文通
  • 做网站和网页的目的和作用南京做网站的公司
  • 杭州滨江区抖音seo行情seo教程网站优化
  • 中信建设有限责任公司招标平台安徽百度seo公司
  • 玩具租赁系统网站开发与实现网页开发用什么软件
  • 建电子商务网站需要多少钱竞价推广账户竞价托管费用
  • 做网站用什么团建网页优化包括什么
  • 学会python做网站wordpress企业网站模板
  • ecs云服务器建设网站自媒体账号申请
  • 中职示范校建设验收网站宁波关键词优化平台
  • 建站做得好的公司金融网站推广圳seo公司
  • 微信开放平台文档搜索引擎优化的流程
  • 南京网站建设知识手机如何制作网页链接
  • 福州网站建设服务价格最实惠北京发生大事了
  • 计算机网络技术网站开发网站设计开发网站
  • 青岛网站建设加盟公司网站产品推广
  • 关于景区网站规划建设方案书宁波seo专员
  • 做网站用上面软件写代码比较好想要网站导航正式推广