25.3.3 Header File Specification
Header file specifications that use directory separators do not conform to the CCI.
Example
The following example shows two conforming include directives.
#include <usb_main.h>
#include "global.h"
Differences
Header file specifications that use directory separators have been allowed in previous versions of all compilers. Compatibility problems arose when Windows-style separators “\” were used and the code was compiled under other host operating systems. Under the CCI, no directory separators should be used.
Migration to the CCI
Any #include
directives that use directory separators in the header file
specifications should be changed. Remove all but the header file name in the directive.
Add the directory path to the compiler’s include search path or MPLAB X IDE equivalent.
This will force the compiler to search the directories specified with this option.
For example, the following code:
#include <inc/lcd.h>
should be changed to:
#include <lcd.h>
and the path to the inc
directory added to the compiler’s header search
path in your MPLAB X IDE project properties, or on the command-line as follows:
-Ilcd