首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

一个异常:Ambiguity between 'TGridDrawState' and 'Gridseh:TGridDrawSta

2013-07-09 
一个错误:Ambiguity between 'TGridDrawState' and 'Gridseh::TGridDrawState'错误所

一个错误:Ambiguity between 'TGridDrawState' and 'Gridseh::TGridDrawState'
错误所在的语句:
void __fastcall StringGrid1DrawCell(TObject *Sender, int ACol,
          int ARow, TRect &Rect, TGridDrawState State);

错误提示:
Ambiguity between 'TGridDrawState' and 'Gridseh::TGridDrawState'


背景:之前我的一个Form里面用了GridEh的控件,后来改用了StringGrid控件。
在为StringGrid1添加DrawCell事件的后,编译时,报了这样的错。
为了修改这个错误,我做了以下几件事:
1、在头文件中,把之前GridEh相关的头文件都注释了
2、在实现文件中,注释了
//#pragma link "DBGridEh"
//#pragma link "DBGridEhGrouping"
//#pragma link "GridsEh"
3、重新Make了工程

但是都不管用,我已经不知道怎么处理了,请高手们提供思路。 Ambiguity
[解决办法]
文件中有这句话#include <Grids.hpp>,而Grids.hpp文件中有个
typedef Set<Grids__3, gdSelected, gdFixed>  TGridDrawState;定义

grideh有自己的定义,所有重复了。

[解决办法]
TGridDrawState名字空间冲突问题及解决方法
http://www.ccrun.com/article.asp?i=1003&d=15f173

热点排行