CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Invalid Pre-Processor directive Export requires IDE

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rovtech



Joined: 24 Sep 2006
Posts: 262

View user's profile Send private message AIM Address

Invalid Pre-Processor directive Export requires IDE
PostPosted: Sat Mar 31, 2012 3:39 pm     Reply with quote

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
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Mar 31, 2012 4:24 pm     Reply with quote

See this thread. It may help:
http://www.ccsinfo.com/forum/viewtopic.php?t=46750
rovtech



Joined: 24 Sep 2006
Posts: 262

View user's profile Send private message AIM Address

PostPosted: Sat Mar 31, 2012 5:07 pm     Reply with quote

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.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Mar 31, 2012 6:04 pm     Reply with quote

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.
rovtech



Joined: 24 Sep 2006
Posts: 262

View user's profile Send private message AIM Address

Problem solved
PostPosted: Sun Apr 01, 2012 7:33 am     Reply with quote

Yes I had both files there.
I just removed the one and it works fine.
Sorry for being so stupid. Embarassed
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group