I’ve made a Makefile project (New -> C Project -> Makefile project). And it’s correctly compiles.
But syntax checker is not working properly because of Eclipse doesn’t import some important options from makefiles. -I (header folders) for example.
How to solve this problem?
Eclipse uses build output generated by your makefiles to parse compilation flags, inclusion paths, predefined macros, etc. It expects that your build system echoes each command it executes.
That is, it will not work, if the output of
makelooks like this:Make sure, that it prints raw commands, like:
Some build tools provide an option to enable a verbose mode (like
make V=1). However, handwritten makefiles are usually OK, because Make echoes executed commands by default.In this case Eclipse will be able to recognize build options (like
path/to/includeorFOO=1) and use them to setup C/C++ indexer.Related project settings
Configuring the project:
After that you need to perform a fresh build from inside Eclipse (Clean Project, then Build Project), so that it will see a complete build log.
This feature is rather fragile, and gets broken sometimes… Usually it helps to flush the index using Project -> Index -> Rebuild.