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

A #DEVICE required before this line

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



Joined: 10 Sep 2009
Posts: 1
Location: mumbai india

View user's profile Send private message

A #DEVICE required before this line
PostPosted: Thu Sep 10, 2009 1:14 am     Reply with quote

hi
I'm using pcm c compiler. In my project I'm using more than one c file.
When I include these files and compiled, errors occured:
Quote:

Invalid Pre-Processor directive
A #DEVICE required before this line

Can any one help regarding this.
_________________
mahadev
Ttelmah
Guest







PostPosted: Thu Sep 10, 2009 2:52 am     Reply with quote

Basically, get your sequence right.....

Your code should always be ordered like this:

Code:

#include <processor file>
//// Start of 'configuration' block
#device options (adc etc.)

#fuses for your project
#use delay(clock for your processor)
#use statements for serial/SPI etc.
////  This block of stuff can itself be in an include file, but _must_ appear
//before anything else.

#include your other .c files, .h files etc..

Basically the configuration stuff, _must_ be loaded, before anything else.

Best Wishes
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