Visual studio code 如何修复';stdio.h';在VScode上找不到文件
最近我升级到大苏尔(11.4)。 当我尝试在VS code in C中编码时,我得到警告“stdio.h”文件未找到 当我试图编译它时,我得到了错误Visual studio code 如何修复';stdio.h';在VScode上找不到文件,visual-studio-code,clang,vscode-settings,macos-big-sur,Visual Studio Code,Clang,Vscode Settings,Macos Big Sur,最近我升级到大苏尔(11.4)。 当我尝试在VS code in C中编码时,我得到警告“stdio.h”文件未找到 当我试图编译它时,我得到了错误 main.c:1:10: fatal error: 'stdio.h' file not found #include <stdio.h> ^~~~~~~~~ In file included from x.cpp:1: In file included from /usr/local/opt/llvm/bin/../i
main.c:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
In file included from x.cpp:1:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/iostream:37:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/ios:214:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/iosfwd:95:
/usr/local/opt/llvm/bin/../include/c++/v1/wchar.h:119:15: fatal error: 'wchar.h' file not
found
#include_next <wchar.h>
这是task.json文件
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/usr/local/Cellar/llvm/11.1.0/include/c++/v1"
],
"defines": [],
"macFrameworkPath": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "macos-clang-x64"
}
],
"version": 4
}
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: clang build active file",
"command": "/usr/bin/clang",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "compiler: /usr/bin/clang"
}
]
}
我还安装了xcode和命令行工具