最新版Duilib在VS2012下编译错误的解决方法
svn了好几次最新版本的项目源代码, 在VS2012下编译老是出错, 改了后没记录, 结果又忘记, 所以在此记录下.
这个问题很普遍, 非常多的人遇到.
至于其它的示例Demo的错误则简单修改项目属性即可.
好了,错误描述就像下面这样:
1>------ Build started: Project: DuiLib, Configuration: UnicodeDebug Win32 ------
1> StdAfx.cpp
1>c:\users\yangtao\desktop\new folder\duilib\Control/UIFlash.h(10): warning C4192: automatically excluding 'IServiceProvider' while importing type library '..\Utils/Flash11.tlb'
1> UIWebBrowser.cpp
1>c:\program files\windows kits\8.0\include\um\dispex.h(228): error C2371: 'IDispatchEx' : redefinition; different basic types
1> c:\program files\windows kits\8.0\include\um\dispex.h(45) : see declaration of 'IDispatchEx'
1>c:\program files\windows kits\8.0\include\um\dispex.h(455): error C2872: 'IDispatchEx' : ambiguous symbol
1> could be 'c:\program files\windows kits\8.0\include\um\dispex.h(228) : IDispatchEx'
1> or 'c:\users\yangtao\desktop\new folder\duilib\build\debug_u\flash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx'
1>c:\program files\windows kits\8.0\include\um\dispex.h(791): error C2371: 'ICanHandleException' : redefinition; different basic types
1> c:\program files\windows kits\8.0\include\um\dispex.h(73) : see declaration of 'ICanHandleException'
1>c:\program files\windows kits\8.0\include\um\dispex.h(977): error C2872: 'IDispatchEx' : ambiguous symbol
1> could be 'c:\program files\windows kits\8.0\include\um\dispex.h(228) : IDispatchEx'
1> or 'c:\users\yangtao\desktop\new folder\duilib\build\debug_u\flash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx'
1>c:\program files\windows kits\8.0\include\um\dispex.h(995): error C2872: 'IDispatchEx' : ambiguous symbol
1> could be 'c:\program files\windows kits\8.0\include\um\dispex.h(228) : IDispatchEx'
1> or 'c:\users\yangtao\desktop\new folder\duilib\build\debug_u\flash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx'
1>C:\Program Files\Windows Kits\8.0\Include\um\mshtml.h(9754): error C2872: 'IDispatchEx' : ambiguous symbol
1> could be 'c:\program files\windows kits\8.0\include\um\dispex.h(228) : IDispatchEx'
1> or 'c:\users\yangtao\desktop\new folder\duilib\build\debug_u\flash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx'
1>C:\Program Files\Windows Kits\8.0\Include\um\mshtml.h(9778): error C2872: 'IDispatchEx' : ambiguous symbol
1> could be 'c:\program files\windows kits\8.0\include\um\dispex.h(228) : IDispatchEx'
1> or 'c:\users\yangtao\desktop\new folder\duilib\build\debug_u\flash11.tlh(297) : ShockwaveFlashObjects::IDispatchEx'

解决方案:
修改UIWebBrowser.cpp和UIWebBrowser.h:
修改前:

修改后:

女孩不哭 @ cnblogs.com/memset @ 2014-05-11
最新版Duilib在VS2012下编译错误的解决方法的更多相关文章
- vs2010打包系统必备选择.net framework 3.5sp1编译错误的解决方法
利用visual studio 2010进行打包程序,默认安装的是Framework 4.0,如果需要将3.5sp1打包到系统中一起安装(选择了"从与我的应用程序相同的位置下载系统必备组件& ...
- VC6的工程转到VC2010或更高版本出现fatal error C1189编译错误的解决方法
以前也遇到过,当时解决了没写下来,这次正好又遇到了,就顺手写一下吧,别下次又忘记了. 当VC6的工程转到VC2010或更高版本时编译出现如下错误: c:\program files\microsoft ...
- vc6.0转vs2012的一些错误与解决方法
1>------ 已启动生成: 项目: NMW210, 配置: Debug Win32 ------ abs_position = fabs((float)posiTemp1 - (float) ...
- Ncut源码编译错误的解决方法
NCut是一个比较老的开源代码了.所以在新的matlab的环境下老出各种bug. 经过自己的各种折腾,总结为一下几点: 1.保证matlab的mex是有C编译器可以用的,具体可以用 mex -setu ...
- 18.16 gcc-3.4.5编译错误及解决方法集锦
18.16.1 自写BootLoader错误 ERROR : boot.c:: warning: return type of 'main' is not `int' ANSWER : int mai ...
- Office Word等双击空白处的“隐藏的模块中的编译错误:MTW5”解决
Microsoft Visual Basic for Applications 隐藏的模块中的编译错误:MTW5. ...
- 在vs2012下编译出现Msvcp120d.dll 丢失的问题
之前在vs2012下编译一个opencv程序时,一直出现msvcp120d.dll文件丢失的提示信息,最初会在网上找dll下载,将其拖入系统文件夹再进行regsvr32命令操作,结果都没有解决错误,甚 ...
- GCC-4.6.3编译linux2.6.32.12内核出现“重复的成员‘page’”错误的解决方法
使用gcc4.6.3编译linux2.6.32.12内核出现错误如下: In file included from drivers/net/igbvf/ethtool.c:36:0: drivers/ ...
- VS2010出现FileTracker : error FTK1011编译错误的解决办法
VS2010出现FileTracker : error FTK1011不知道是不是vs2010的一个bug,反正有人提交了. FileTracker : error FTK1011编译错误的解决办法有 ...
随机推荐
- boost状态机学习二(秒表)
基础主题:秒表 下面我们要为一个机械秒表建模一个状态机.这样一个秒表通常会有两个按钮. * Start/Stop * Reset 同时有两种状态: * Stoped: 表针停留在上次停止时的位置: o ...
- thinkphp开发规范
1.编写目的 为了更好的提高技术部的工作效率,保证开发的有效性和合理性,并可最大程度的提高程序代码的可读性和可重复利用性,指定此规范.开发团队根据自己的实际情况,可以对本规范进行补充或裁减. ...
- The illustrated guide to a Ph.D.
- js 对象方法、类方法、原型方法的区别;私有属性、公有属性、公有静态属性的区别
<html> <head> <meta http-equiv="Content-Type" content="text/html; char ...
- linux在所有文件中查找某一个字符
# find <directory> -type f -name "*.c" | xargs grep "<strings>" < ...
- Power Network(网络流最大流 & dinic算法 + 优化)
Power Network Time Limit: 2000MS Memory Limit: 32768K Total Submissions: 24019 Accepted: 12540 D ...
- CocoStudio基础教程(6)使用CocoStudio编辑帧事件并关联到程序
1.概述 帧事件也是新加入的功能.这篇中我们将看到如何使用它.我们将上篇中制作的动画稍加修改. 2.用途与原理 首先介绍一下帧事件.正如其名:一个与帧相关联的事件. 为什么要这么做呢?首先没人想做一大 ...
- sql把表格拼成字符串,多半使用于GROUP BY
--假定要聚合的字段是id ,要统计的字段是tname --select a.tname from @T1 a for xml path('row') select id,REPLACE(replac ...
- HNU 12845 Ballot Analyzing Device
题目链接:http://acm.hnu.cn/online/?action=problem&type=show&id=12845&courseid=270 解题报告:有m个认给 ...
- 专注docker安全:Security Scanning
导读 Docker毫无疑问是近期运维同学们的热点话题,Docker安全也由此倍受重视,Docker Security Scanning 是一款Docker镜像扫描的安全工具,目前已经在Docker C ...