View previous topic :: View next topic |
Author |
Message |
rovtech
Joined: 24 Sep 2006 Posts: 262
|
Invalid Pre-Processor directive Export requires IDE |
Posted: Sat Mar 31, 2012 3:39 pm |
|
|
I can’t get it any simpler but I get the error message:
Error 7 "C:\Program Files\PICC\devices\16F722.h" Line 196(2,6): Invalid Pre-Processor directive Export requires IDE
My main program is:
Code: |
#include <16F722.h>
#fuses INTRC_IO, NOWDT, PUT, NOPROTECT, BROWNOUT, MCLR
#include <ST7920_pb.c>
// Main Function
void main()
{
while (TRUE)
{
glcd_init(); // this represents other programming
}
}
//The ST7920_pb.c function I include is:
void glcd_init()
{
delay_cycles (1);
}
|
I have other programs of the same form that work fine. It seems the error is in the 16F722.h file but it works and compiles my other programs. Am I doing something dumb?
PCM and MPLAB on Win XP |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
![](templates/subSilver/images/spacer.gif) |
rovtech
Joined: 24 Sep 2006 Posts: 262
|
|
Posted: Sat Mar 31, 2012 5:07 pm |
|
|
It basically says I have to 'include' a second .c file, which I have done.
I am doing exactly the same as a working program that uses #include <lcd.c> and which still compiles with no errors or warnings. |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Mar 31, 2012 6:04 pm |
|
|
Are you "adding" the ST7920_pb.c file to the Project Window in MPLAB,
so that it appears in the list of Source Files ? If so, don't do that.
The only file that should be in the list of Source Files in the Project Window
is the main file in the project. Remove ST7920_pb.c from the Source
Files list. (Select it and press the Del key).
If you want to see ST7920_pb.c in the Project Window, so you can click
on it for easy access, then "add" it to the "Other Files" list in that window.
Then it will compile OK. |
|
![](templates/subSilver/images/spacer.gif) |
rovtech
Joined: 24 Sep 2006 Posts: 262
|
Problem solved |
Posted: Sun Apr 01, 2012 7:33 am |
|
|
Yes I had both files there.
I just removed the one and it works fine.
Sorry for being so stupid. ![Embarassed](images/smiles/icon_redface.gif) |
|
![](templates/subSilver/images/spacer.gif) |
|