keil新建工程后,加入例程文件,编译报错:declaration may not appear after executable statement in block
意思是:在语句后不能定义变量
问题:keil的坑,默认-C89,则不允许程序员在语句后定义变量
解决方法:
工程options–>C/C++–>MISC Controls–>写入-C99。
重新编译OK。
Keil编译出错:declaration may not appear after executable statement in block
最新推荐文章于 2024-04-17 11:01:47 发布