error: #268: declaration may not appear after executable statement in block
C99 Mode 解决keil导入文件报错,变量定义位置
·
一、问题描述
具体错误
Hardware\Seg_Dis.c(20): error: #268: declaration may not appear after executable statement in block
Driver\cw32f003_iwdt.c(72): error: #70: incomplete type is not allowed
Driver\cw32f003_iwdt.c(72): error: #65: expected a “;”
导入某个已有项目时,报错,定位错误到具体位置,检查 ; } 发现没有异常


二、解决方法
错误原因是:类似int b 的变量定义,不能出现在可执行语句之后
点击魔术棒勾选C99 Mode后才能这么定义。

更多推荐



所有评论(0)