我最近更新了Mac,自此以后一直遇到运行C ++文件的问题。在项目中的每个include语句上,我都会收到此错误消息#include errors detected. Please update your includePath.
,但我不知道要在includePath
中包含什么。我见过适用于Ubuntu和Windows的示例,但没有Mac的示例。
这是保存我的配置的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
}