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 CCS Technical Support

Many sources

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







Many sources
PostPosted: Mon Jul 11, 2005 7:31 pm     Reply with quote

Hello, I am an new user and a new programmer with CCS.

I made a project with two sources files and two header files. But I am unable to link it together.

In the main_prg.c:

#include "main_prg.h"
#include <16F877.h>
#include "lcd.c"

in LCD.C

#include "lcd.h"

I got the error in the lcd.h

A #DEVICE required before this line

the line pointed is

#byte portD = 8

I don't understand, I need help.

Thanks,
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jul 11, 2005 7:52 pm     Reply with quote

The main #include file for the PIC should come first.
See my post near the end of this thread, which shows
how include several .H and .C files in your main file.
http://www.ccsinfo.com/forum/viewtopic.php?t=18649
You have to do it that way because there is no linker.
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