From: M. F. F. <m_f...@ho...> - 2001-09-22 04:28:08
|
Hi.. all, and thank you Bernhard, I tried to use one of 'printf_large()', 'printfl()' and 'vprintf()' like this: /*********************/ #include <at89x51.h> #include <stdio.h> ... char MY_VAR; ... void main( void ) { ... printfl( "0x%2h", MY_VAR ); ... } /*********************/ ...and the compiler gave me these msgs: ==== C:\Project\AT89 Writer\wri2051\firmware>sdcc -I c:\sdcc\share\include -L c:\sdcc\share\lib\small --code-loc 0xc000 wri2051.c wri2051.c(294):warning *** function 'printfl' implicit declaration wri2051.c(295):warning *** function 'printfl' implicit declaration wri2051.c(294):error *** too many parameters wri2051.c(295):error *** too many parameters error *** code not generated for 'main' due to previous errors ==== I supposed that the 'printfl()' prototype was never declared ( is that right? ) This is part of my code I tried to compile with objective to evaluate the use of printf(), /********************/ #include <at89x51.h> #include <stdio.h> /* i want to use prinf() */ unsigned char MY_VAR; ... void main( void ) { ... printf( "0x%2h", MY_VAR ); ... } /********************/ ... and I got this warning msgs: ======== > cd C:\Project\AT89 Writer\wri2051\firmware\ > sdcc -I c:\sdcc\share\include -L c:\sdcc\share\lib\small --code-loc 0xc000 wri2051.c C:\Project\AT89 Writer\wri2051\firmware>sdcc -I c:\sdcc\share\include -L c:\sdcc\share\lib\small --code-loc 0xc000 wri2051.c library file c:\sdcc\share\lib\small/libsdcc.lib library file c:\sdcc\share\lib\small/libint.lib library file c:\sdcc\share\lib\small/liblong.lib library file c:\sdcc\share\lib\small/libfloat.lib ?ASlink-Warning-Undefined Global '_putchar' referenced by module 'vprintf' C:\Project\AT89 Writer\wri2051\firmware> ======== I searched the file _putchar.*, and found none of them. Is this normal ? Could some one give me hints on how to use one of 'printf...()', please.... :( regrds, fhy |