? 中文字幕之人妻中出,国产成A人片在线观看视频下载
聯(lián)系我們

給我們留言

聯(lián)系我們

地址:福建省晉江市青陽街道洪山路國際工業(yè)設(shè)計園納金網(wǎng)

郵箱:info@narkii.com

電話:0595-82682267

(周一到周五, 周六周日休息)

當(dāng)前位置:主頁 > 3D教程 > 圖文教程

UE4 boost lib連接錯誤的解決方法

來源: 52vr | 責(zé)任編輯:傳說的落葉 | 發(fā)布時間: 2019-06-11 08:27 | 瀏覽量:

[UE4]boost lib連接錯誤:LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL'

 

UE4工程的debug模式鏈接boost的時候出現(xiàn)錯誤:

UE4  boost error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in 

 

以下是UE4源碼的注釋,意思是說UE4編譯器在編譯debug版本的時候仍然會鏈接release版本的第三方庫,因為UE4的編譯器不支持在調(diào)試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;

內(nèi)容轉(zhuǎn)自:https://forums.unrealengine.com/showthread.php?63340-Building-engine-with-Debug-Runtime-library

 

解決辦法:

最簡單的方法就是在構(gòu)建debug版本時候也去鏈接release版本的第三方庫。

 

網(wǎng)上另外一張方法:

MyProject.Build.cs文件的構(gòu)造方法中添加配置:

C#代碼  
  1. BuildConfiguration.bDebugBuildsActuallyUseDebugCRT = true;  

 這樣貌似鏈接boost是可以了,但是又出現(xiàn)其他鏈接錯誤:

 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


相關(guān)文章
網(wǎng)友評論

您需要登錄后才可以發(fā)帖 登錄 | 立即注冊

關(guān)閉

全部評論:0條

推薦
熱門