error C2371: “IDispatchEx”: 重定义;不同的基类型的解决方案

编译错误如下:f:\duilib\duilib\Control/UIFlash.h(10): warning C4192: 导入类型库“IServiceProvider”时自动排除“..\Utils/Flash11.tlb”1> UIWebBrowser.cpp1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dispex.h(217): error C2371: “IDispatchEx”: 重定义;不同的基类型1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dispex.h(53) : 参见“IDispatchEx”的声明1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dispex.h(435): error C2872: “IDispatchEx”: 不明确的符号1>可能是“c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dispex.h(217) : IDispatchEx”1>或“f:\duilib\duilib\build\debug\flash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx”1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dispex.h(869): error C2872: “IDispatchEx”: 不明确的符号1>可能是“c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dispex.h(217) : IDispatchEx”1>或“f:\duilib\duilib\build\debug\flash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx”1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dispex.h(887): error C2872: “IDispatchEx”: 不明确的符号1>可能是“c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dispex.h(217) : IDispatchEx”1>或“f:\duilib\duilib\build\debug\flash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx”1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\mshtml.h(4715): error C2872: “IDispatchEx”: 不明确的符号1>可能是“c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dispex.h(217) : IDispatchEx”1>或“f:\duilib\duilib\build\debug\flash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx”1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\mshtml.h(4738): error C2872: “IDispatchEx”: 不明确的符号1>可能是“c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dispex.h(217) : IDispatchEx”1>或“f:\duilib\duilib\build\debug\flash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx”fix的方法:UIFlash.h行: #import "..\Utils/Flash11.tlb" raw_interfaces_only, named_guids改为: #import "..\Utils/Flash11.tlb" raw_interfaces_only, named_guids, rename("IDispatchEx","IMyDispatchEx")可以解决以上的问题。为了兼容性更好,防止系统flash的插件更新后又有问题,,干脆直接导入你自己系统的OCX,于是将这一行最好改为: #import "PROGID:ShockwaveFlash.ShockwaveFlash" \raw_interfaces_only,/* Don’t add raw_ to method names */ \named_guids,/* Named guids and declspecs */ \rename("IDispatchEx","IMyDispatchEx")/* fix conflicting with IDispatchEx ant dispex.h */

转自: ?id=90

他们不计后果的彼此拥抱,握紧双手,怕天会亮,怕爱会走。

error C2371: “IDispatchEx”: 重定义;不同的基类型的解决方案

相关文章:

你感兴趣的文章:

标签云: