Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vscode#包括检测到的错误。请在MacOS上更新您的includePath 我最近更新了我的Mac,从那时起就一直有运行C++文件的问题。在项目中的每个include语句中,我都会收到此错误消息#检测到include错误。请更新您的includePath。我不知道我的includePath中应该包含哪些内容。我看过Ubuntu和Windows的例子,但没有看到mac_Macos_Visual Studio Code_Include Path - Fatal编程技术网

Vscode#包括检测到的错误。请在MacOS上更新您的includePath 我最近更新了我的Mac,从那时起就一直有运行C++文件的问题。在项目中的每个include语句中,我都会收到此错误消息#检测到include错误。请更新您的includePath。我不知道我的includePath中应该包含哪些内容。我看过Ubuntu和Windows的例子,但没有看到mac

Vscode#包括检测到的错误。请在MacOS上更新您的includePath 我最近更新了我的Mac,从那时起就一直有运行C++文件的问题。在项目中的每个include语句中,我都会收到此错误消息#检测到include错误。请更新您的includePath。我不知道我的includePath中应该包含哪些内容。我看过Ubuntu和Windows的例子,但没有看到mac,macos,visual-studio-code,include-path,Macos,Visual Studio Code,Include Path,这里是保存我的配置的c_cpp_properties.json文件 { "configurations": [ { "name": "Mac", "includePath": ["${workspaceFolder}/usr/lib/**"], "defines": [], "macFrameworkPath": ["/System/Library/Frameworks", "/Library/Frameworks"], "compilerPath": "/usr/bin/

这里是保存我的配置的
c_cpp_properties.json
文件

{

"configurations": [
{
  "name": "Mac",
  "includePath": ["${workspaceFolder}/usr/lib/**"],
  "defines": [],
  "macFrameworkPath": ["/System/Library/Frameworks", "/Library/Frameworks"],
  "compilerPath": "/usr/bin/clang",
  "cStandard": "c11",
  "cppStandard": "c++17",
  "intelliSenseMode": "clang-x64"
}
],
"version": 4

}

您需要更新
includePath
以指向未正确添加
#include
的文件的正确位置。你可以像在Ubuntu中一样这样做,除了在你自己的机器上使用文件的位置。头文件在mac上的位置在哪里?当你已经有了头文件的确切名称时,你无法在自己的计算机上查找头文件的位置?