vscode使用EIDE+Clangd插件导入keil C51工程无法找到<REG51.H>头文件的问题 #465
Unanswered
duanjianbo3330
asked this question in
Q&A
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
最近我使用vscode+clangd+EIDE环境导入keil C51工程后,编译没问题,并且在build/xxx工程名文件下生成了compile_commands.json文件。在clangd的Arguments参数中指定了compile_commands.json文件路径。clangd能够成功找到compile_commands.json文件,并生成“.cache”文件夹。但是#include <REG51.H>无法找到这个头文件,即便我在.clangd中添加了REG51.H头文件路径,还是无法找到该头文件。我感觉这个EIDE插件的一个bug,想请教一下大家是否是我想的这样?(因为不借助EIDE,我把添加路径的.clangd文件复制到keil C51工程根目录下,使用vscode直接打开keil C51工程文件就可以找到REG51.H所在路径)。



clangd指定头文件的参考:
https://www.zhihu.com/question/427250657/answer/3246879549
Beta Was this translation helpful? Give feedback.
All reactions