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上的位置在哪里?当你已经有了头文件的确切名称时,你无法在自己的计算机上查找头文件的位置?