My local z88dk copy is not totally in sync, but I don't seem to have seen changes on stdio recently.
So:
https://www.seasip.info/ZX/Haunted/haunted.c
$ zcc +zx -lndos haunted.c
Error at module 'haunted_c': symbol '_fgetc_cons' already defined in module 'haunted_c'
Errors in source file c:/z88dk/\lib\target\zx\classic\spec_crt0.asm:
Error at module 'haunted_c': symbol '_fgetc_cons' already defined in module 'haunted_c'
fgetc_cons and stdio
Re: fgetc_cons and stdio
In general, the linkage is tested on every build for every target using the feature test: https://github.com/z88dk/z88dk/blob/mas ... /feature.c
So, this one must be something to do with the source. It's a fun one, in stdio.h we've got this:
And haunted.c has this:
Which courtesy of that macro is rewritten as void fgetc_cons() and you end up with duplicate label.
So, this one must be something to do with the source. It's a fun one, in stdio.h we've got this:
Code: Select all
#define getkey() fgetc_cons()
Code: Select all
void getkey()
{
printf("Press RETURN to continue ");
fflush(stdout);
getchar();
}
Re: fgetc_cons and stdio
uh, thanks! I wasn't able to spot it