Thaodan
Thaodan

Reputation: 107

Modify Flycheck GCC include path

I wanted to add project specific includes with a dir local doing this:

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

This works when using flycheck-compile but when using flycheck-buffer it complains: Error from syntax checker c/c++-gcc: Wrong type argument: arrayp, nil

What I'm doing wrong?

Upvotes: 0

Views: 2837

Answers (1)

Konrad Eisele
Konrad Eisele

Reputation: 3194

This is what works for me:

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

Note the missing "." and extra brackets.

Upvotes: 1

Related Questions