生成c_cpp_properties.json文件
- 打开命令面板
ctrl+shift+p
,输入[c/c++:]edit configuration(UI)
或[c/c++:]edit configuration(JSON)
即可生成; - 添加
includePath
,例如:
{"configurations": [{"name": "Linux","includePath": ["${workspaceFolder}/**","/usr/include","/path/to/thirdparty/include"],"compilerPath": "/usr/bin/g++","cStandard": "c11","cppStandard": "c++17","intelliSenseMode": "gcc-x64"}],"version": 4
}