【VS Code】"The 'clang-format' command is not available. Please check your clang-format."报错

版权声明:可以转载奥 https://blog.csdn.net/Jiajikang_jjk/article/details/84320884

"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

猜你喜欢

转载自blog.csdn.net/Jiajikang_jjk/article/details/84320884