First off, the syntax highlighting of MPLAB X is terrible, so only trust the compiler's output, not whether the IDE can or can't parse your files. Second, adding a header file to your project does not mean it's added to the compiler's include path. If needed, you add the paths in the project's settings.