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"