| |||||
Technical Support Support Resources
Product Information | CARM: L104: MULTIPLE PUBLIC DECLARATION 'GETCHAR'Information in this article applies to:
QUESTIONAfter adding the scanf function to my program code, I now get the following two linker error messages:
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: getchar?T
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: getchar?A
The getchar function is defined in the module SERIAL.C (which I have taken from one of the example projects) and this module is translated using the INTERWORK directive. What causes these errors? ANSWERscanf uses the function _getkey as basic input routine. Rename getchar to _getkey as shown below:
int _getkey (void) { /* Read character from Serial Port */
while (!(U1LSR & 0x01));
return (U1RBR);
}
After this, everything should just work fine. MORE INFORMATION
SEE ALSOFORUM THREADSThe following Discussion Forum threads may provide information related to this topic. Last Reviewed: Tuesday, October 18, 2005 | ||||
| |||||