简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM