error: #5: cannot open source input file "XXX.h": No such file or directory

MDK出现“error: #5: cannot open source input file “XXX.h”: No such file or directory”有两种可能

  • 忘记将编程头文件的路径添加入MDK中

  • 程序员忽略版本差异(新版本MDK ST库修改了很多头文件名称,导致之前默认的头文件如:stm32f10x_lib.h、stm32f10x_conf.h等无法识别)
    解决方法:
    1.更新头文件问,如“stm32f10x_lib.h”改“stm32f10x.h”
    2.直接用旧文件放置工程处,添加路径即可

猜你喜欢

转载自blog.csdn.net/qq_31441951/article/details/86568812