报错的都是从 wsl 下自动复制过来的头文件:
该项目的CMakeSettings.json如下:
{
"configurations": [
{
"name": "WSL-GCC-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeExecutable": "cmake",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
"wslPath": "${defaultWSLPath}",
"intelliSenseMode": "linux-gcc-x64",
"remoteCopyUseCompilerDefaults": true
},
{
"name": "WSL-GCC-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeExecutable": "cmake",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
"wslPath": "${defaultWSLPath}",
"variables": []
}
]
}
折腾了一晚上在全网没找到合适的解决方案...求助各位万能的 V 友,为什么 IntelliSense 会出现头文件报错?如何解决?鄙人学艺不精,请求各位大佬指点