Step 5.1: Specify the C Include Directories for the Compiler
The Include Directory paths are used by the C compiler to find files referenced through #include directives. This is the preferred method of referencing include files that are not at the root of your project directory, as opposed to using relative paths in code: #include "subdirectory/filename.h".
Right-click on the project and select Properties.
Click on Conf: [default] > XC16 > xc16-gcc.
Click on the drop-down for Option Categories and select Preprocessing and messages.
Click the C include dirs triple dot box.
Browse for <your MPLAB X IDE project folder>. Add each highlighted directory and click Open. Click the Browse button to select the next directory. This directive permits files in these directories to be added to the build process.
Note: Directories can only be selected one-at-a-time.
The C include dirs window should be the same as the image below. Press OK to apply the changes.
Step 5.2: Build Application
Right-click on the project and select Build.
The project will successfully build.
Step 5.3: Program MCU
Click the Make and Program Device icon to program the MCU.
On the Starter Kit on Board tab, you will be able to see “Programming/Verify complete”.