vim-syntastic / syntastic

Syntax checking hacks for vim
Do What The F*ck You Want To Public License
11.3k stars 1.14k forks source link

Find shared/library headers #2411

Open MatheusFarias03 opened 1 year ago

MatheusFarias03 commented 1 year ago

Hello! I was using vim to see some source code files in the PostgreSQL-11-17 directory when I saw that syntastic was giving an error: parse_cte.c|15 col 10 error| fatal error: 'postgres.h' file not found.

This happened is some files under the postgresql-11.17/src/backend/parser directory. But with further inspection, I found that it indeed had a postgres.h file under postgresql-11.17/include.

Why does syntastic gives an error whilst having a file which it gives as not having? Is there an option that I can make it recognize it?

lcd047 commented 1 year ago

Why does syntastic gives an error whilst having a file which it gives as not having?

Because you didn't configure it for your project.

Is there an option that I can make it recognize it?

There is (it's described in the manual), but you probably shouldn't go there. First, syntastic was meant as a generic framework for linters, and it's unnecessarily awkward for languages such as C/C++. There are specialized plugins (such as YCM) that do a much better job for C/C++. And second, syntastic is dead, you should consider switching to something like ALE instead.