关于【error: expected identifier before ‘,’ token】错误的检查

在编译项目时,发生了如下错误:

In file included from trunk/be/include/nodes/JoinedTable.h:11:0,
                 from trunk/be/include/nodes/SelectStmt.h:34,
                 from trunk/be/include/nodes/SubPlan.h:19,
                 from trunk/be/include/queryexecutor/iqueryexecutor.h:20,
                 from trunk/be/include/coord/RootCoordinator.h:14,
                 from trunk/be/include/sessionservice/query_exec_engine.h:9,
                 from  trunk/be/include/sessionservice/gmcommond_engine.h:28,
                 from  trunk/be/include/gmcommand/IGMCommandService.h:27,
                 from trunk/be/include/storagelimit/StorageLimitCmdService.h:31,
                 from trunk/be/src/storagelimit/StorageLimitCmdService.cpp:23:
trunk/be/include/nodes/filter.h:34:7: error: expected identifier before ‘,’ token
     IN,
       ^
In file included from trunk/be/include/nodes/JoinedTable.h:11:0,
                 from trunk/be/include/nodes/SelectStmt.h:34,
                 from trunk/be/include/nodes/SubPlan.h:19,
                 from trunk/be/include/queryexecutor/iqueryexecutor.h:20,
                 from trunk/be/include/coord/RootCoordinator.h:14,
                 from trunk/be/include/sessionservice/query_exec_engine.h:9,
                 from trunk/be/include/sessionservice/gmcommond_engine.h:28,
                 from trunk/be/include/gmcommand/IGMCommandService.h:27,
                 from trunk/be/include/storagelimit/StorageLimitCmdService.h:31,
                 from trunk/be/src/storagelimit/StorageLimitServiceBlock.cpp:10:
trunk/be/include/nodes/filter.h:34:7: error: expected identifier before ‘,’ token
     IN,
       ^

经过检查文件,提示错误处仅仅是个枚举:

enum OP {
    GT,
    GE,
    LT,
    LE,
    EQ,
    IN,
    NE,
    OP_NL
};

网上搜索从这个博客得知,有可能是因为在包含此文件的源文件中已经IN这个定义了。于是使用

#ifdef IN
#undef IN
#endif

来解除IN的宏,之后编译通过。


查找哪个地方存定义了IN,这里费了很多周折,最后是将IN写到源文件中:然后通过IDE的查找定义功能查找到,在Common-def.h和DataStreamReader.h中有如下定义:

//DataStreamReader.h

#define IN
#define OUT

//Common-def.h

#define IN
#define OUT

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值