Thiliniv
Junior Member level 3
I hav written a code in MPLAB and compiled it usin Hitech C. Though I searched internet also I couln't find the solution. attached here is my code and the error message.
Anybody pls help me ASAP.
Error msg I'm getting,
Error [500] ; 0. undefined symbols:
_getch(pwnw.obj) _putch(pwnw.obj)
********** Build failed! **********
Anybody pls help me ASAP.
Code:
#include <stdio.h>
#include <htc.h>
#include "usart.h"
/* A simple demonstration of serial communications which
* incorporates the on-board hardware USART of the Microchip
* PIC16Fxxx series of devices. */
void main(void){
unsigned char input;
INTCON=0; // purpose of disabling the interrupts.
init_comms(); // set up the USART - settings defined in usart.h
// Output a message to prompt the user for a keypress
printf("\rPress a key and I will echo it back:\n");
while(1){
input = getch(); // read a response from the user
printf("\rI detected [%c]",input); // echo it back
}
}
Error msg I'm getting,
Error [500] ; 0. undefined symbols:
_getch(pwnw.obj) _putch(pwnw.obj)
********** Build failed! **********