1、安装c/c++
2、安装clang
3、配置工程头文件路径,Ctrl+Shift+p, 选择C/C++:Edit Configurateions(JSON),弹出c_pp_properties.json文件进行配置
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
"${workspaceFolder}/Prebuilt/include"
"${workspaceFolder}/Prebuilt/include/core"
"${workspaceFolder}/Prebuilt/include/drivers"
"${workspaceFolder}/Prebuilt/include/libneul"
"${workspaceFolder}/Prebuilt/include/middleware"
"${workspaceFolder}/Prebuilt/include/network"
],
"defines": [],
"compilerPath": "/opt/compiler/gcc-12/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
4、如果还是不行,切换成中文显示。安装插件:
Chinese Language Pack for Visual Studio Code。
https://blog.csdn.net/wangzhiqin365/article/details/107174777/