错误MIDL2003:重新定义:IMyInterface [英] error MIDL2003: redefinition : IMyInterface

查看:87
本文介绍了错误MIDL2003:重新定义:IMyInterface的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在修改MFC项目odl文件以添加新接口ILayer,但是该文件已经存在于其他项目中,因此在构建所有项目时,我会收到与重新定义相关的错误.如下:

Hi,
I am modifying the MFC project odl file for adding new interface ILayer but it is already exists in other project so when I build all the projects I am getting the redefinition related error. as below:

f:\clearcase\compomap_source\compomap_cvob\source\vs2010\comworkspace\workspacetest\stdafx.h(68): warning C4278: 'min': identifier in type library '..\..\Debug\ComMapServer.exe' is already a macro; use the 'rename' qualifier
4>f:\clearcase\compomap_source\compomap_cvob\source\vs2010\comworkspace\workspacetest\stdafx.h(68): warning C4278: 'max': identifier in type library '..\..\Debug\ComMapServer.exe' is already a macro; use the 'rename' qualifier
5>  Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\msxml.idl
5>  msxml.idl
5>  Processing ..\ComWorkspace\ComWorkspace.idl
5>  ComWorkspace.idl
5>  Processing ..\ComMapWorks\ComMapServer\ComMapServer.idl
5>  ComMapServer.idl
5>.\CompoMap.odl(1329): error MIDL2003: redefinition : ILayer
5>.\CompoMap.odl(1521): error MIDL2003: redefinition : IItem
5>.\CompoMap.odl(2328): warning MIDL2214: semantic check incomplete due to previous errors
6>------ Build started: Project: compotest, Configuration: Debug Win32 ------

推荐答案

回答了您自己的问题.如果ILayer已经存在于其他地方,为什么还要重新定义它.可以使用唯一名称定义它,也可以使用现有名称.
You have pretty much answered your own question. Why are you redifining ILayer if it already exists elsewhere. Either define it under a unique name, or use the existing one.


这篇关于错误MIDL2003:重新定义:IMyInterface的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆