Microsoft Visual Studio Code软件includePath配置
程序员文章站
2022-07-14 09:05:08
...
Microsoft Visual Studio Code配置includePath
在哪个文件里设置includePath
默认在用户主目录文件夹下的.vscode里面
还有一种你自己设置了工作区的,在工作区文件夹下的.vscode
文件名是c_cpp_properties.json ,因为我设置的是C和C++的include文件.。
怎么查找你系统的include所有目录
Windows直接搜索文件夹的,我们就不说了,这里说说linux下的方式:在shell里敲击gcc -v -E -x c++ - ,会给你列出系统里所有有h文件的目录
编辑方法
"includePath": [
"${workspaceFolder}/**","/usr/include/","/usr/include/x86_64-pc-linux-gnu"
,"/usr/local/include","$GCC_HOME/include"
,"$GCC_HOME/lib/gcc/x86_64-pc-linux-gnu/7.5.0/include","/usr/local/gcc-7.5.0/include"
,"$GCC_HOME/lib/gcc/x86_64-pc-linux-gnu/7.5.0/include-fixed"
,"$GCC_HOME/lib/gcc/x86_64-pc-linux-gnu/7.5.0/include"
,"$GCC_HOME/lib/gcc/x86_64-pc-linux-gnu/7.5.0/include/cilk"
,"$GCC_HOME/lib/gcc/x86_64-pc-linux-gnu/7.5.0/include/sanitizer"
,"$GCC_HOME/lib/gcc/x86_64-pc-linux-gnu/7.5.0/include/ssp"
,"$GCC_HOME/lib/gcc/x86_64-pc-linux-gnu/7.5.0/include/"
,"$GCC_HOME/include/c++/7.5.0"
,"$GCC_HOME/include/c++/7.5.0/backward"
,"$GCC_HOME/include/c++/7.5.0/x86_64-pc-linux-gnu"
,"$GCC_HOME/include/c++/7.5.0/x86_64-pc-linux-gnu/bits"
,"$GCC_HOME/include/c++/7.5.0/x86_64-pc-linux-gnu/ext"
,"$GCC_HOME/include/c++/7.5.0"
includePath里面的项的写法是:includePath:[“绝对路径一”,“绝对路径二”,“绝对路径三”]
只要语法没错你可以写到一行里,我的Gcc主目录我用的环境变量设置了所以是GCC_HOME ,用$放前面引用
效果图
推荐阅读
-
Visual Studio Code (vscode) 配置 C / C++ 环境
-
Visual Studio Code (VSCode) 配置搭建 C/C++ 开发编译环境的流程
-
vscode(Visual Studio Code)配置PHP开发环境的方法(已测)
-
Visual Studio Code 汉化,Visual Studio Code 配置
-
本人Visual Studio Code 配置
-
Visual Studio Code 配置python环境
-
Visual Studio Code安装+配置python环境
-
Microsoft Visual Studio Code配置Python教程
-
Microsoft Visual Studio Code软件includePath配置
-
Microsoft Visual Studio配置汇编语言开发环境