【问题标题】:emacs flycheck syntax checher for cpp filecpp文件的emacs flycheck语法检查器
【发布时间】:2013-10-09 13:10:25
【问题描述】:

我正在使用 Emacs 24.3.1 编辑 .cpp 文件,当我激活 M-x flycheck-mode 时,它显示状态为 (C++/l FlyC- Abbrev),其中 FlyC- 表示它没有找到合适的语法检查器。

在我从flycheck-select-checker 获得的列表中,我看不到任何看起来像 C++ checher 的东西:

Possible completions are:
bash    coffee-coffeelint   css-csslint
emacs-lisp  emacs-lisp-checkdoc     go-build
go-gofmt    go-test     haml
html-tidy   javascript-jshint   json-jsonlint
lua     perl    php
php-phpcs   python-flake8   python-pyflakes
python-pylint   rst     ruby
rust-rustc  sass    scss
sh  tex-chktex  tex-lacheck
xml-xmlstarlet  zsh

任何想法可能缺少什么?

【问题讨论】:

标签: c++ emacs flycheck


【解决方案1】:

当我运行flycheck-select-checker 时,我同时拥有c/c++-clangc/c++-cppcheck。也许您使用的是过时的 flycheck?

【讨论】:

  • 我重做了一个M-x package-install + flycheck,它完成了整个Contacting host marmalade, ..., compiling, ... Done (Total of 2 files compiled, 1 skipped),所以我假设安装成功,但仍然没有任何 c++-clang 或 c++-cppcheck 的迹象。
  • 试试MELPA,它是最近的(而且更不稳定,通常比果酱)。
  • 安装最新版本的 flycheck 并将 clang 和 cppcheck 二进制文件指向我的 $PATH 后,它现在可以工作了。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-08-17
相关资源
最近更新 更多