[置顶] VS编译duilib项目时候的错误解决方法整理


@1:找不到Riched20.lib

用everything等软件搜索下磁盘,找到所在的目录添加到vs的库目录即可,我得是C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib;其他的vs版本可能不一样,自行搜索


@2: “IDispatchEx”: 重定义;不同的基类型 点击打开链接

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 */ 

 

vs2013则需要:

#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 */  \  
    rename("ICanHandleException", "IMyICanHandleException")

@3:'ICanHandleException' : redefinition; different basic types 

在UIWebBrowser.h中:

添加 #include <MsHTML.h>
修改#include "Utils/WebBrowserEventHandler.h"为#include "../Utils/WebBrowserEventHandler.h"




你可能感兴趣的:([置顶] VS编译duilib项目时候的错误解决方法整理)