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

*SOLVED* Guidelines for including multiple source files?

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



Joined: 09 Oct 2007
Posts: 62

View user's profile Send private message

*SOLVED* Guidelines for including multiple source files?
PostPosted: Fri Mar 14, 2008 9:12 am     Reply with quote

PIC16F690-ICD / PCM 4.060 / ICD2

I get an error 128:

Error 128 "temperature.c" Line 3(1,1): A #DEVICE required before this line

When I try to take out a module from my main source file and place it in a separate source file (temperate.c) to better organize my code.

I used the include line and tried adding #device to the temperature.c file.

Thanks!

http://forum.microchip.com/forceddownload.aspx?file=0%3b322231


Last edited by ThomasC on Fri Mar 14, 2008 10:39 am; edited 1 time in total
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Mar 14, 2008 10:25 am     Reply with quote

Only the main source file should be put in the "Source Files" list.
Don't put any #include files in that list. You can add them to the
"Other files" list.

Look at the Project window in the lower left corner of your screen shot.
You have your main file, PIC16F690.c in the list. But you also have
temperature.c in the list. Remove it. Add it to the "Other Files" list.
ThomasC



Joined: 09 Oct 2007
Posts: 62

View user's profile Send private message

PostPosted: Fri Mar 14, 2008 10:38 am     Reply with quote

SOLVED.

Thanks for the quick response. I am literally taking notes of your advice. Thanks again.
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