Keil编译出现报错:Cannot open include file: 'stdbool.h': No such file or directory,或者出现Error: L6411E: No compatible library exists with a definition of startup symbol __main报错,原因是在电脑上同时装了keil和ADS两个编译器,
需要添加2个系统变量。
1. 在我的电脑点击属性--->高级--->环境变量---->系统变量,增加环境变量名: ARMCC5LIB
变量值:D:\Software\Keil_v5\ARM\ARMCC\lib(根据自己的Keil安装时所在的目录而定)
2. 再添加一个环境变量:ARMCC5INC D:\Software\Keil_v5\ARM\ARMCC\include(根据自己的Keil安装时所在的目录而定)
添加完后无需重启电脑。关闭MDK, 重新打开工程即可。
因为电脑是英文系统的,所以配置如下几个图所示,
提示:不推荐把Keil或ADS1.2卸载掉,以上的配置可以实现兼容这两个软件存在的冲突。