做者:送外賣轉行計算機php
來源:SegmentFault 思否nginx
1.command + p, 而後輸入 >C/C++c++
選擇 編輯配置(JSON)json
而後在工做區會出現一個.vscode文件夾, 其中會有一個.json文件的配置
微信
2.打開命令行 輸入app
gcc -v -E -x c++ -
會有如下的信息 學習
`ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1"ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/local/include"ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/Library/Frameworks"#include "..." search starts here:#include <...> search starts here: /usr/local/include /Library/Developer/CommandLineTools/usr/include/c++/v1 /Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include /Library/Developer/CommandLineTools/usr/include /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks (framework directory)End of search list.`
將上面的路徑複製到剛剛的json文件中ui
以下圖spa
{ "configurations": [ { "name": "Mac", "includePath": [ "${workspaceFolder}/**", "/usr/local/include/**", "/Library/Developer/CommandLineTools/usr/include/c++/v1/**", "/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include/**", "/Library/Developer/CommandLineTools/usr/include/**", "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/**", "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/**" ], "defines": [], "macFrameworkPath": [], "compilerPath": "/usr/local/bin/gcc-7", "cStandard": "gnu11", "cppStandard": "gnu++14", "intelliSenseMode": "clang-x64" }],"version": 4}
注意要在後面加 /**.net
而後紅色波浪線就不會出現了。
End
通過了近一年時間的打磨,全球首本 VS Code 中文書,終於來了!想要學習更多 VS Code 的內容,歡迎閱讀《Visual Studio Code 權威指南》。
更棒的是,《Visual Studio Code 權威指南》的新書籤售會,將於 8 月 22 日舉行!快來報名參與吧!
本文分享自微信公衆號 - 玩轉VS Code(vs_code)。
若有侵權,請聯繫 support@oschina.cn 刪除。
本文參與「OSC源創計劃」,歡迎正在閱讀的你也加入,一塊兒分享。