问题解决:#include errors detected. Please update your includePath.

2021-09-18 15:05:08 浏览数 (1)

当我看到解决方法的时候,不知道为什么我的第一反应是:司马当霍马医咯。

在.vscode文件夹下,找到 c_cpp_properties.json,人家报错都跟你说了病灶,这点不用我说。

代码语言:javascript复制
{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "/usr/include/**",		这里加这一行
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "gnu17",
            "cppStandard": "gnu  14",
            "intelliSenseMode": "linux-gcc-x64",
            "compileCommands": "${workspaceFolder}/build/release-cpp11/compile_commands.json"
        }
    ],
    "version": 4
}

0 人点赞