svn了好几次最新版本的项目源代码, 在VS2012下编译老是出错, 改了后没记录, 结果又忘记, 所以在此记录下.
这个问题很普遍, 非常多的人遇到.
至于其它的示例Demo的错误则简单修改项目属性即可.
好了,错误描述就像下面这样:
1>------ Build started: Project: DuiLib, Configuration: UnicodeDebug Win32 ------
1> StdAfx.cpp
1>c:usersyangtaodesktop ew folderduilibControl/UIFlash.h(10): warning C4192: automatically excluding 'IServiceProvider' while importing type library '..Utils/Flash11.tlb'
1> UIWebBrowser.cpp
1>c:program fileswindows kits8.0includeumdispex.h(228): error C2371: 'IDispatchEx' : redefinition; different basic types
1> c:program fileswindows kits8.0includeumdispex.h(45) : see declaration of 'IDispatchEx'
1>c:program fileswindows kits8.0includeumdispex.h(455): error C2872: 'IDispatchEx' : ambiguous symbol
1> could be 'c:program fileswindows kits8.0includeumdispex.h(228) : IDispatchEx'
1> or 'c:usersyangtaodesktop ew folderduilibuilddebug_uflash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx'
1>c:program fileswindows kits8.0includeumdispex.h(791): error C2371: 'ICanHandleException' : redefinition; different basic types
1> c:program fileswindows kits8.0includeumdispex.h(73) : see declaration of 'ICanHandleException'
1>c:program fileswindows kits8.0includeumdispex.h(977): error C2872: 'IDispatchEx' : ambiguous symbol
1> could be 'c:program fileswindows kits8.0includeumdispex.h(228) : IDispatchEx'
1> or 'c:usersyangtaodesktop ew folderduilibuilddebug_uflash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx'
1>c:program fileswindows kits8.0includeumdispex.h(995): error C2872: 'IDispatchEx' : ambiguous symbol
1> could be 'c:program fileswindows kits8.0includeumdispex.h(228) : IDispatchEx'
1> or 'c:usersyangtaodesktop ew folderduilibuilddebug_uflash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx'
1>C:Program FilesWindows Kits8.0Includeummshtml.h(9754): error C2872: 'IDispatchEx' : ambiguous symbol
1> could be 'c:program fileswindows kits8.0includeumdispex.h(228) : IDispatchEx'
1> or 'c:usersyangtaodesktop ew folderduilibuilddebug_uflash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx'
1>C:Program FilesWindows Kits8.0Includeummshtml.h(9778): error C2872: 'IDispatchEx' : ambiguous symbol
1> could be 'c:program fileswindows kits8.0includeumdispex.h(228) : IDispatchEx'
1> or 'c:usersyangtaodesktop ew folderduilibuilddebug_uflash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx'
解决方案:
修改UIWebBrowser.cpp和UIWebBrowser.h:
修改前:
修改后:
女孩不哭 @ cnblogs.com/memset @ 2014-05-11