braddy dru

LINKER error

Discussion created by braddy dru on Mar 21, 2008
Latest reply on Mar 23, 2008 by braddy dru
Hi ,
I am a newbie on micrcontroller. I am implementing a function (in C)  that reads in messages received at the SCI input.
The function reads characters in using the GetSci( ) function, storing the characters into the inData array.

 The function returns a message giving the actual length of the message via the hyperterminal (by which I am supposed to dialog with the PC) . the length has a max value of 100, but can be shorter . this is why the function displays the actual size of the message.

when I compile with code warrior, I have the linker error L 1822 TERMIO_PUTCHAR undefined.
reading other posts about it, it seems to be the printf function but I did not understood the proposed fixes. I am using the MC9S12C32 processor.
Here my function:
int MsgIn(char inData[], unsigned int length){    int size=0;    char character=0;    character =GetSci();  // reading character from SCI       while(size<length){        inData[size]=character;        size++;      if(character==LF)
      {        inData[size]=0;// stor a 0 at the end of the message        break;}      }// end while   
    return printf("The length is %d \n",size);}


Can I have some suggestions about how to fix it?