C2373的问题
请教各位高手啊,这个问题该如何解决?急等,谢谢了。
报错现象:
...projects\XXX\app\app\prototype\pos_variables.c(38) : error C2373: 'X1' : redefinition; different type modifiers
...projects\XXX\app\app\prototype\pos.h(434) : see declaration of 'X1'
IDE:VS2005
编译设置:已经调整为编译C语言,多字节编译设置
示例:
file :pos.h
#ifndef POS_H /* Prevent multiple inclusions of this .h file*/
#define POS_H
#ifdef POS_MODULE
extern const int X1;
extern const int X2;
extern const int X3;
#else
extern const int X1;
#endif
#endif
file:pos_variables.c
#include "pos.h"
int X1;
int X2;
int X3;
备注信息:在K51编译器里能通过编译,没有报错