码迷,mamicode.com
首页 > 其他好文 > 详细

VSCode使用

时间:2019-10-25 20:26:32      阅读:77      评论:0      收藏:0      [点我收藏+]

标签:include   path   选择   c++   pat   and   folder   ons   color   

使用VSCode

c_cpp_properties.json添加Include Paths

Ctrl+Shift+P可以调出控制窗口
再输入edit或者configuration,选择"C/Cpp:Edit Configurations":
然后就出来了。 

 

 1 {
 2     "configurations": [
 3         {
 4             "name": "Linux",
 5             "includePath": [
 6                 "${workspaceFolder}/**",
 7                 "/home/wmz/darknet/**"
 8             ],
 9             "defines": [],
10             "compilerPath": "/usr/bin/gcc",
11             "cStandard": "c11",
12             "cppStandard": "c++17",
13             "intelliSenseMode": "clang-x64"
14         }
15     ],
16     "version": 4
17 }

 

只有下面这一句是我添加的:

1  "/home/wmz/darknet/**"

这个是配置路径使用的,之前直使用:

 "/home/wmz/darknet/src/**"

 之前一直报找不到头文件,是因为有些文件在src文件夹之外。

 

VSCode使用

标签:include   path   选择   c++   pat   and   folder   ons   color   

原文地址:https://www.cnblogs.com/juluwangshier/p/11739918.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!