Closed 17609394ch closed 2 months ago
1>Mindrove.lib(board_shim.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(locale0.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(locale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(iosptrs.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(wlocale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(xlocale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(xlock.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(xdateord.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(StlCompareStringA.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(winapinls.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(StlCompareStringW.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(StlLCMapStringW.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(StlLCMapStringA.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>libcpmt.lib(winapisupp.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MD_DynamicRelease”(EMG.obj 中) 1>LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library 1>Mindrove.lib(board_shim.obj) : error LNK2001: 无法解析的外部符号 __CxxFrameHandler4 1>Mindrove.lib(board_shim.obj) : error LNK2001: 无法解析的外部符号 __GSHandlerCheck_EH4 1>C:\Users\26801\source\repos\EMG\x64\Release\EMG.exe : fatal error LNK1120: 2 个无法解析的外部命令
1>Mindrove.lib(board_shim.obj) : error LNK2001: 无法解析的外部符号 __GSHandlerCheck_EH4 1>C:\Users\26801\source\repos\EMG\x64\Release\EMG.exe : fatal error LNK1120: 1 个无法解析的外部命令
vs2017-win11-x64-release
int main() { BoardShim::enable_dev_board_logger();
return 1;
}
Hi!
You should note that the provided library is built in Release configuration. The error of _ITERATOR_DEBUG_LEVEL should be resolved if you build your project in Release. For the MT_StaticRelease mismatch if you are setting your cpp project yourself you should look at the Project properties-> C/C++ -> Code generation -> Runtime library option.
br
Thank you for your reply. I found that I was able to compile successfully in vs2019 and vs2022, but there was an error in compiling in vs2017 (_GSHandlerCheck-EH4).
1>------ 已启动生成: 项目: EMG, 配置: Debug x64 ------ 1>Mindrove.lib(board_shim.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>Mindrove.lib(board_shim.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(locale0.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(locale0.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(locale0.obj) : error LNK2005: "void cdecl std::_Facet_Register(class std::_Facet_base )" (?_Facet_Register@std@@YAXPEAV_Facet_base@1@@Z) 已经在 msvcprtd.lib(locale0_implib.obj) 中定义 1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ) 已经在 msvcprtd.lib(MSVCP140D.dll) 中定义 1>libcpmt.lib(locale0.obj) : error LNK2005: "private: static class std::locale::_Locimp cdecl std::locale::_Init(bool)" (?_Init@locale@std@@CAPEAV_Locimp@12@_N@Z) 已经在 msvcprtd.lib(MSVCP140D.dll) 中定义 1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo ,char const )" (?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z) 已经在 msvcprtd.lib(MSVCP140D.dll) 中定义 1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo )" (?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z) 已经在 msvcprtd.lib(MSVCP140D.dll) 中定义 1>libcpmt.lib(locale.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(locale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(iosptrs.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(iosptrs.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(wlocale.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(wlocale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(xlocale.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(xlocale.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(xlock.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(xlock.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(xlock.obj) : error LNK2005: "public: cdecl std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QEAA@H@Z) 已经在 msvcprtd.lib(MSVCP140D.dll) 中定义 1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __cdecl std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QEAA@XZ) 已经在 msvcprtd.lib(MSVCP140D.dll) 中定义 1>libcpmt.lib(xdateord.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(xdateord.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(StlCompareStringA.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(StlCompareStringA.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(winapinls.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(winapinls.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(StlCompareStringW.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(StlCompareStringW.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(StlLCMapStringW.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(StlLCMapStringW.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(StlLCMapStringA.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(StlLCMapStringA.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>libcpmt.lib(winapisupp.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2”(EMG.obj 中) 1>libcpmt.lib(winapisupp.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MT_StaticRelease”不匹配值“MDd_DynamicDebug”(EMG.obj 中) 1>LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library 1>Mindrove.lib(board_shim.obj) : error LNK2001: 无法解析的外部符号 CxxFrameHandler4 1>Mindrove.lib(board_shim.obj) : error LNK2001: 无法解析的外部符号 __GSHandlerCheck_EH4 1>C:\Users\26801\source\repos\EMG\x64\Debug\EMG.exe : fatal error LNK1120: 2 个无法解析的外部命令 1>已完成生成项目“EMG.vcxproj”的操作 - 失败。 ========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========