Keil编译报错:Cannot open include file: 'stdbool.h': No such file or directory问题解决

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卸载掉,以上的配置可以实现兼容这两个软件存在的冲突。

 

 

引用\[1\]:glibconfig.h没有这样的文件或目录(glibconfig.h no such file or directory)(转,侵-->联-->删)我刚在Raspbian(Debian版本)上安装了glib。我想使用glib读取一个配置文件。我正在尝试在Codeblocks中编写一个C应用程序,并使用头文件#include <glib.h>。但是在gtypes.h中出现了一个错误,致命错误:glibconfig.h没有这样的文件或目录。我在项目->构建选项->编译器设置->其他选项中添加了-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include这个路径,正如我在教程中所读到的。我还需要声明-L/usr/lib -lm -lglib-2.0,如果是的话,我应该在Codeblocks中如何声明呢? 解决办法:使用pkg-config。将foo.c替换为您要编译的文件,然后使用以下命令进行编译:gcc `pkg-config --cflags glib-2.0` foo.c `pkg-config --libs glib-2.0`。这将自动包含所需的头文件和库文件。\[1\] 引用\[3\]:\[root@ser6-51 kernels\]# ls -ltr total 4 lrwxrwxrwx 1 root root 34 Aug 26 10:49 2.6.32-431.el6.x86_64 -> /lib/modules/2.6.32-431.el6.x86_64 drwxr-xr-x 2 root root 4096 Aug 26 11:51 2.6.32-573.3.1.el6.x86_64 问题:application\modbus_fun.h(3): error: #5: cannot open source input file "system.h": No such file or directory 回答: 根据您提供的信息,您在编译时遇到了一个错误,错误信息是"application\modbus_fun.h(3): error: #5: cannot open source input file "system.h": No such file or directory"。这个错误表明编译器无法找到名为"system.h"的源文件。您需要确保在编译时正确设置了包含文件的路径。您可以在编译选项中添加"-I"参数,后面跟着包含文件的路径。例如,如果"system.h"位于当前目录下的"include"文件夹中,您可以使用以下命令进行编译:gcc -I./include foo.c。这将告诉编译器在编译时搜索"include"文件夹以找到"system.h"文件。请根据您的实际情况进行相应的调整。 #### 引用[.reference_title] - *1* [fatal error: glibconfig.h: no such file or directory](https://blog.csdn.net/int_t/article/details/120175762)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [Keil MDK5解决error: L6002U: Could not open file …\obj\main.o: No such file or directory](https://blog.csdn.net/weixin_44097539/article/details/124798550)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [libipvs.h:14:23: error: net/ip_vs.h: No such file or directory](https://blog.csdn.net/YABIGNSHI/article/details/48001823)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值