Frequently Asked Questions

How do I fix the issue in MPLAB® X with getting Error#7 Invalid Pre-Processor directive Export requires IDE?

Some versions of MPLAB® X add the Makefile to the project's included files, which forces a multiple compilation build to be done. For any customer who does not have the IDE version of the CCS C Compiler, this causes the following error to occur when building the project: Error#7 Invalid Pre-Processor directive Export requires IDE.

To fix this issue, you need to manually remove the Makefile from the project. That can be done in MPLAB® X by first opening the project in MPLAB® X and then opening the project's properties. The project's properties can be opened in one of two ways.

  1. Right-click the project name in the Projects box and select Properties.

    Open project properties way 1
  2. Left-click the wrench icon on the project's Dashboard.

    Open project properties way 2

In the Project Properties box that opens, select File Include/Exclusion on the left-hand side. Then under Included Files: select Makefile and click the '>' button to move it over the Excluded Files side.

Change project properties

Save project properties

Finally click the Apply button followed by the OK button at the bottom of the Project Properties box to save the changes. After make the above changes the project should build correctly, assuming no errors in the project's code.


C-Aware IDE Demo
Embedded C Learners Kit
EZ App Lynx