(转载) VS编译duilib项目时候的错误解决方法整理

来源:互联网 发布:广州用友软件代理商 编辑:程序博客网 时间:2024/05/16 03:57

原文地址:http://blog.csdn.net/x356982611/article/details/30217473



@1:找不到Riched20.lib

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

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

UIFlash.h行:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片
  1. #import "..\Utils/Flash11.tlb" raw_interfaces_only, named_guids   
改为:
[cpp] view plaincopy在CODE上查看代码片派生到我的代码片
  1. #import "..\Utils/Flash11.tlb" raw_interfaces_only, named_guids, rename("IDispatchEx","IMyDispatchEx")  
为了兼容性更好,防止系统flash的插件更新后又有问题,干脆直接导入你自己系统的OCX,于是将这一行最好改为:


[cpp] view plaincopy在CODE上查看代码片派生到我的代码片
  1. #import "PROGID:ShockwaveFlash.ShockwaveFlash"  \    
  2.     raw_interfaces_only,       /* Don't add raw_ to method names */ \    
  3.     named_guids,           /* Named guids and declspecs */    \    
  4.     rename("IDispatchEx","IMyDispatchEx"/* fix conflicting with IDispatchEx ant dispex.h */   

 

vs2013则需要:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片
  1. #import "PROGID:ShockwaveFlash.ShockwaveFlash"  \    
  2.     raw_interfaces_only,       /* Don't add raw_ to method names */ \    
  3.     named_guids,           /* Named guids and declspecs */    \    
  4.     rename("IDispatchEx""IMyDispatchEx"/* fix conflicting with IDispatchEx ant dispex.h */  \    
  5.     rename("ICanHandleException""IMyICanHandleException")  

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

在UIWebBrowser.h中:

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

0 0
原创粉丝点击