cc65 printf substitions failing?

From: afachat_at_gmx.de
Date: Fri, 14 May 2021 21:28:13 +0200
Message-ID: <5460669.DvuYhMxLoT_at_euler>
Hi there,

I am trying to build and run a small program for the PET using cc65.

However, this line gives me woes:

	cprintf("Hello (%d)!\n\r", strlen(s->name));

The only thing it prints is "Hello ()!", so it seems no format substitution 
takes place, even though the man page says all formats from printf are 
supported.

It's actually from a uIP 1.0 distribution and built like:

	cc65 -g -I../uip -I.  -I../apps/hello-world ../apps/hello-world/
hello-world.c -o obj/hello-world.s
	ca65   -o obj/hello-world.o obj/hello-world.s
	ar65 a apps.a obj/hello-world.o
	ld65 -t pet obj/main.o obj/clock-arch.o obj/enceth.o apps.a uip.a /
usr/local/share/cc65/lib/pet.lib -o uip

I also tried using %s instead of %d, but this also does not substitute.

Any ideas?

Many thanks
André
Received on 2021-05-14 22:00:03

Archive generated by hypermail 2.3.0.