【发布时间】:2014-06-07 13:43:42
【问题描述】:
我尝试将包含路径添加到flycheckc/c++-clang,但没有成功。
我将foo.h 放入~/local/include 并将以下几行添加到init.el:
(add-hook 'c++-mode-hook
(lambda () (setq flycheck-clang-standard-library "libc++")))
(add-hook 'c++-mode-hook
(lambda () (setq flycheck-clang-language-standard "c++1y")))
(add-hook 'c++-mode-hook
(lambda () (setq flycheck-clang-include-path
(list "$HOME/local/include/"))))
我在一个名为 test.cpp 的文件中写道
#include <foo.h>
flycheck这么说
'foo.h' 文件未找到
我做错了什么?我正在使用来自package.el 和clang3.4 的emacs24、flycheck.el。
【问题讨论】: