【VS Code】"The 'clang-format' command is not available. Please check your clang-format."報錯
阿新 • • 發佈:2018-11-26
文章目錄
"The ‘clang-format’ command is not available…"報錯
說明
博主是winds10系統
VS Code 64位
一、安裝外掛‘clang-format’
在安裝了clang-format
外掛之後,進行程式碼格式化時還是會報錯:The 'clang-format' command is not available. Please check your clang-format.
,報錯的大概意思是:命令不可用。
二、解決方案
安裝Clang-Format
(這裡指的不是外掛奧,準確的來說是安裝LLVM)
獲取連結: http://releases.llvm.org/download.html#7.0.0 ,連結內容如下所示:
點選安裝,將bin所在目錄配置到環境變數中即可。
說明:
以上操作完成之後,可能程式碼開頭會出現:stdio.h file not found
的報錯,此時最簡單的處理方法就是:點選提示小燈泡進行提示Add,,,操作就ok。
三、參考連結
1、http://releases.llvm.org/download.html#7.0.0
2、https://www.codepool.biz/vscode-format-c-code-windows-linux.html
3、https://blog.csdn.net/okasy/article/details/79558388