求助STVD的结构体定义报错问题

2019-07-19 20:46发布

代码如下:

typedef struct 
{
u8 counter;
u8 longFlag;
u8 shortFlag;
u8 temp;
} KeyScanTpyedef;



KeyScanTpyedef zd;

zd.counter=1;
zd.longFlag=1;
zd.shortFlag=1;
zd.temp=1;

然后报错:


----------- Project test - STM8 Cosmic - Configuration Release -------------

Compiling ..userkey.c...
cxstm8 +mods0 -pp -i..include -i..user -i..stm8s_stdperiph_driverinc -i"C:Program FilesCOSMICCXSTM8Hstm8"  -clRelease -coRelease ..userkey.c
#error cpstm8 ..userkey.c:40(0+2) redeclared external zd
#error cpstm8 ..userkey.c:41(0+2) redeclared external zd
#error cpstm8 ..userkey.c:42(0+2) redeclared external zd
#error cpstm8 ..userkey.c:43(0+2) redeclared external zd
..userkey.c:
 The command: "cxstm8 +mods0 -pp -i..include -i..user -i..stm8s_stdperiph_driverinc -i"C:Program FilesCOSMICCXSTM8Hstm8"  -clRelease -coRelease ..userkey.c" has failed, the returned value is: 1
exit code=1.

test.elf - 6 error(s), 0 warning(s)


请问是什么原因?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
2条回答
阿拓
1楼-- · 2019-07-19 22:05
#include <string.h>
lvsx2017
2楼-- · 2019-07-19 23:41
 精彩回答 2  元偷偷看……

一周热门 更多>