问题主要有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