clang 在 vscode找不到头文件的解决方法
c++ - .clangd: use different compiler flags depending on file extension - Stack Overflow
vscode输入
>clangd: Open project configuration file
在.clangd
文件中添加include地址(绝对地址)
# Fragment common to C and C++ source files
CompileFlags:
Add:
- "--include-directory=C:/code_project/cfiles test/include"
(相对地址)
# Fragment common to C and C++ source files
CompileFlags:
Add:
- "--include-directory=../include"