hum,
I forget to put the code..

here is it:

#include <stdio.h>

void putchar(char c) {
}

void main(void) {
    printf("%0*u", 10, 100);
}



On 9/26/05, Martyn Welch <welchm@comp.lancs.ac.uk> wrote:
Hi Diego,

Have you written an implementation of the putchar() function for your
hardware implementation?

Due to the many varied ways in which printf() could be used, for
example: RS232 comms to displaying on a 2x40 character LCD display, you
need to define your own putchar() function which is utilised by printf()
when it needs to display a character.

Martyn

On Mon, 2005-09-26 at 09:45 -0300, Diego Manenti Martins wrote:
> Hi,
> I doownloaded the sdcc-snapshot-i586-mingw32msvc-20050926
> and when I try to compile a test source I give this error:
>
> C:\projeto\testesdcc>sdcc -mpic14 -p16f877 main.c
> Processor: 16f877
> main.c:4: warning 85: in function putchar unreferenced function
> argument : 'c'
> message: using default linker script "C:\Program Files\gputils\lkr
> \16f877.lkr"
> error: missing definition for symbol "_printf", required by "main.o"
>
> C:\projeto\testesdcc>
>
> Is not possible to use printf with pic14?
>
> Thank you!
>
--
Martyn Welch (welchm@comp.lancs.ac.uk )

PGP Key : http://ubicomp.lancs.ac.uk/~martyn/pgpkey.html


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDN/c2QPzYXciChNcRAg/bAJwLGJQ0iZMBIuu7nr5ShQyJNYZ+IgCfRcdB
+UqHsmgYOnrd+VXHmDaikMQ=
=6/0O
-----END PGP SIGNATURE-----