问题描述

main.c(10): error: #5: cannot open source input file “led.h”: No such file or directory
【STM32】Keil5在编译过程中出现.cannot open source input file “xxx.h“: No such file or directory的问题

解决办法

1、点击这个图标

【STM32】Keil5在编译过程中出现.cannot open source input file “xxx.h“: No such file or directory的问题

2、在C/C++选项卡下面的Include Path中添加.h文件

【STM32】Keil5在编译过程中出现.cannot open source input file “xxx.h“: No such file or directory的问题
【STM32】Keil5在编译过程中出现.cannot open source input file “xxx.h“: No such file or directory的问题
【STM32】Keil5在编译过程中出现.cannot open source input file “xxx.h“: No such file or directory的问题
【STM32】Keil5在编译过程中出现.cannot open source input file “xxx.h“: No such file or directory的问题
重新编译通过
【STM32】Keil5在编译过程中出现.cannot open source input file “xxx.h“: No such file or directory的问题

3、检查是否包含进来,并且能不能打开

【STM32】Keil5在编译过程中出现.cannot open source input file “xxx.h“: No such file or directory的问题

4、其它情况

如果已经添加.h文件路径,且确认文件路径没有问题的情况下,编译仍然报错,cannot open source input file “xxx.h”: No such file or directory的情况下,将包含头文件的上层文件夹添加到C/C++选项卡下面的Include Path中再继续尝试试试。

相关文章:

  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
猜你喜欢
  • 2022-01-01
  • 2021-08-07
  • 2021-05-20
  • 2021-09-03
  • 2021-10-03
  • 2021-09-30
  • 2021-08-25
相关资源
相似解决方案