这里写自定义目录标题
最近代码开发需要用到boost,需要对齐进行配置,发现通过brew安装的boost不能链接到,网上找了一些方法,但发现不适用,所以自己进行了相关摸索,以下是相关总结。
info:
- vscode 版本:1.56.2
- boost库版本:1.75
配置方法
先利用 brew list boost
命令找到,本机安装boost所在路径,以下是自己的路径:/usr/local/Cellar/boost/1.75.0_1
然后进行如下步骤:
-
打开设置
-
通过键入include进行筛选,找到下图中2的位置
- 注意这里要选择
System Include Path
:
The value to use for the system include path. If set, it overrides the system include path acquired via “compilerPath” and “compileCommands” settings.
- 注意这里要选择
-
点击在
settings.json
中进行编辑
以下是我新增加的内容:
"C_Cpp.default.systemIncludePath": ["/usr/local/Cellar/boost/1.75.0_1/include"]