c_cpp_properties.json 样例
时间: 2023-08-08 20:10:05 浏览: 90
下面是一个 c_cpp_properties.json 的样例:
```json
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/usr/include",
"/usr/local/include"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
},
{
"name": "Windows",
"includePath": [
"${workspaceFolder}/**",
"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/shared",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/winrt"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "msvc-x64"
}
],
"version": 4
}
```
其中,"name" 字段指定了配置的名称,"includePath" 字段指定了头文件的搜索路径,"defines" 字段指定了宏定义,"compilerPath" 字段指定了编译器的路径,"cStandard" 字段指定了 C 标准的版本,"cppStandard" 字段指定了 C++ 标准的版本,"intelliSenseMode" 字段指定了智能提示的模式。
阅读全文