- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
Using C51 Lib in Creator 1.0, printf() works as putchar() re-defined in main file.
But when re-define getchar() to implement scanf(), error happened:
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: GETCHAR
MODULE: C:\PROGRAM FILES\CYPRESS\PSOC CREATOR\1.0\PSOC CREATOR\IMPORT\KEIL\PK51\8.16\C51\LIB\C51L.LIB (GETCHAR)
DEFINED: E:\1_WaveDAC8_SimpleSine.cydsn\DP8051_Keil_816\Debug\main.OBJ (MAIN)
Any idea about that ?
Thanks very much.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any reason why need to change name of libray function?
I don't think it is a good thing to rename library function. If I need to, I will do something like
char myPutChar(char ip)
{
return putchar(ip);
}
then call myPutchar() later on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you tell us why you are trying to do this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very much for your reply.
Sure, it can be done by retargeting to a function named differently. What puzzled me is the difference for retartgeting functions in Creator. In KEIL, both functions can be redefined directly.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For your question about my senario: getchar() can't be redefined in creator. So I can't use scanf() directly in Creator now.