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

compiler prob with input.c

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







compiler prob with input.c
PostPosted: Wed May 04, 2005 7:54 am     Reply with quote

I have a simple project that has only a main() function, but I needed to retrieve text from the UART, so I included input.c for the get_string function. I simply used

Code:
#include <input.c>


I get several compiler errors that all reference putchar or getchar. Oddly, when I just paste the get_string function into my main file, I get no errors. Obviously I'm doing something very simple incorrectly. Any ideas???? The errors MPLAB gives me are:

*** Error 12 "C:\PROGRA~1\PICC\drivers\input.c" Line 17(16,17): Undefined identifier getch
*** Error 12 "C:\PROGRA~1\PICC\drivers\input.c" Line 19(8,9): Undefined identifier putchar
*** Error 12 "C:\PROGRA~1\PICC\drivers\input.c" Line 46(12,13): Undefined identifier getch
*** Error 12 "C:\PROGRA~1\PICC\drivers\input.c" Line 50(15,16): Undefined identifier putchar
*** Error 12 "C:\PROGRA~1\PICC\drivers\input.c" Line 51(15,16): Undefined identifier putchar
*** Error 12 "C:\PROGRA~1\PICC\drivers\input.c" Line 52(15,16): Undefined identifier putchar
*** Error 12 "C:\PROGRA~1\PICC\drivers\input.c" Line 57(14,15): Undefined identifier putchar
JPA
Guest







PostPosted: Wed May 04, 2005 8:01 am     Reply with quote

You have to use the #use delay and #use rs232 directive before including your file.
PICky
Guest







PostPosted: Wed May 04, 2005 8:05 am     Reply with quote

JPA wrote:
You have to use the #use delay and #use rs232 directive before including your file.


Thanks... that solved it! I knew it was something simple...
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