修改Flycheck GCC包含路径

时间:2015-01-25 19:39:02

标签: c++ emacs cc flycheck

我想添加项目特定的包含dir本地执行此操作:

((c++-mode .
       ( (flycheck-gcc-include-path
          . ( "../engine" "/usr/include/qt"  "/usr/include/qt/QtCore" "/usr/include/qt/QtWidgets" )
          ) )
       ))

这在使用flycheck-compile时有效,但在使用flycheck-buffer时会抱怨:Error from syntax checker c/c++-gcc: Wrong type argument: arrayp, nil

我做错了什么?

1 个答案:

答案 0 :(得分:1)

这对我有用:

((c++-mode 
       (flycheck-gcc-include-path "../engine" "/usr/include/qt"  "/usr/include/qt/QtCore" "/usr/include/qt/QtWidgets" ) ))

注意缺少的"。"和额外的括号。