QT、VS常见bug及解决办法(八)——错误 2 error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MTd_StaticDebug”不匹配值“MT_StaticR

问题主要有2点:
1.error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MD_DynamicRelease”不匹配值“MT_StaticRelease”(BACKUPDLG.obj 中)
  log4cplusS.lib 重新release一次,MD->MT
2.log4cplusSD.lib(patternlayout.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“2”不匹配值“0”(BACKUPDLG.obj 中)
 去掉了ifndef 宏定义,值保留
#pragma comment(lib,"E:/library/log4cplus/msvc8/binRelease/log4cplusS.lib") 


#ifndef _DEBUG 
#pragma comment(lib,"E:/library/log4cplus/msvc8/binDebug/log4cplusSD.lib") 
#else 
#pragma comment(lib,"E:/library/log4cplus/msvc8/binRelease/log4cplusS.lib") 
#endif

转自:https://bbs.csdn.net/topics/390728036

猜你喜欢

转载自blog.csdn.net/qq_37764129/article/details/81195496