UE4工程的debug模式链接boost的时候出现错误:
UE4 boost error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in
以下是UE4源码的注释,意思是说UE4编译器在编译debug版本的时候仍然会链接release版本的第三方库,因为UE4的编译器不支持在调试debug版本的第三方库。
// By default we use the Release C++ Runtime (CRT), even when compiling Debug builds. This is because the Debug C++
// Runtime isn't very useful when debugging Unreal Engine projects, and linking against the Debug CRT libraries forces
// our third party library dependencies to also be compiled using the Debug CRT (and often perform more slowly.) Often
// it can be inconvenient to require a separate copy of the debug versions of third party static libraries simply
// so that you can debug your program's code.
bDebugBuildsActuallyUseDebugCRT = false;
内容转自:https://forums.unrealengine.com/showthread.php?63340-Building-engine-with-Debug-Runtime-library
解决办法:
最简单的方法就是在构建debug版本时候也去链接release版本的第三方库。
网上另外一张方法:
在MyProject.Build.cs文件的构造方法中添加配置:
BuildConfiguration.bDebugBuildsActuallyUseDebugCRT = true;
这样貌似链接boost是可以了,但是又出现其他链接错误:
error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (__imp_?_Debug_message@std@@YAXPEB_W0I@Z) referenced in function "int __cdecl std::_Atomic_compare_exchange_strong_4(unsigned long volatile *,unsigned long *,unsigned long,enum std::memory_order,enum std::memory_order)" (?_Atomic_compare_exchange_strong_4@std@@YAHPECKPEAKKW4memory_order@1@2@Z)
查了一下,论坛上说如果要使用CRT,需要使用源码编译的UE4,因为目前版本对VS2015支持还不完善,有时间了再尝试下。
详情见:https://answers.unrealengine.com/questions/294191/vs2015-linker-errors.html
相关推荐
From_LNK_to_RCE:Finding_bugs_in_Windows_Shell_Link_Parser 应急响应 AI 安全威胁 自动化 信息安全研究
在使用不同版本opencv时,编译器有时会报错,error LNK1104 无法打开文件opencv_core245d.lib,本文给出了详细的解决方法,实测有效
1>save-image-D435.obj : error LNK2001: 无法解析的外部符号 “private: char * __cdecl cv::String::allocate(unsigned __int64)” (?allocate@String@cv@@AEAAPEAD_K@Z) 1>save-image-D435.obj : error LNK2001: ...
(1)Qt5AxContainer.lib error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“1” Qt5AxBase.lib error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“1” ...
在创建MFC项目时, 不使用MFC AppWizard向导, 如果没有设置好项目参数, 就会在编译时产生很多连接错误, 如error LNK2001错误, 典型的错误提示有: libcmtd.lib(crt0.obj) : error LNK2001: unresolved external ...
mfcs40d.lib(dllmodul.obj):error LNK2005:_DllMain@12 already defined in MSVCRTD.LIB (dllmain.obj) mfcs42d.lib(dllmodul.obj):error LNK2005:_DllMain@12 already defined in msvcrtd.lib(dllmain.obj)
uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj) uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl ...
C++调用C函数实例详解 前言:以前见到extern “C”这样的语句,只是简单地知道跟外部链接有关...Test.obj : error LNK2019: 无法解析的外部符号 “void __cdecl DeleteStack(struct _Node *)” (?DeleteStack@@YAXPAU_N
调用directshow出现链接错误,如何解决? player.obj : error LNK2001: unresolved external symbol _IID_IVideoWindow player.obj : error LNK2001: unresolved external symbol _IID_IMediaControl 这是因为...
1>msvcrtd.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) 已经在 libcmtd.lib(typinfo.obj) 中定义...
1文本的绘制 2绘制线条 3绘制矩形 4绘制圆和椭圆 5绘制圆角矩形 6绘制多边形 7动画效果 8抓屏实验
使用最新GitHub上的zxing-cpp工程,编译成功生成的lib文件,以及所有头文件打包,可以直接用于vc工程
3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj) Debug/DCap.exe : fatal error LNK1169: one or more multiply defined symbols found 解决思路: 出现这个错误明显就是两个被link到的library都提供了...
解决error LNK2001 无法解析的外部符号 int __cdecl sprintf
LINK__fatal_error_LNK1123_转换到_COFF_期间失败_文件无效或损坏,把老的版本盖就可以了
1>pythonIniti.obj : error LNK2019: 无法解析的外部符号 __imp___Py_NegativeRefcount,该符号在函数 “public: __thiscall boost::python::api::object_base::~object_base(void)” (??1object_base@api@python@...
解决报错Error LNK2001:unresolved external symbol
vs2013环境下, 编译报error LNK2001: unresolved external symbol "class ATL::CAtlBaseModule ATL::_AtlBaseModule",由于缺少atlsd.lib库。
此工具需.net4.5,解压后运行易语言静态连接编译器,点击连接编译即可
解决安装vs2012后vs2010 LINK : fatal error LNK1123: failure during conversion to COFF Wrong version: 03/18/2010 01:16 PM 31,048 cvtres.exe Correct version: 02/21/2011 06:03 PM 31,056 cvtres.exe