I've been having this problem for months. It just seems to be an ugly warning as everything seems to work, but I don't like warnings.
It seems that tschak909 had the same problem here: viewtopic.php?p=211844#p211844 and got it sorted out, but the same solution doesn't work for me.
This is my issue:
I created a couple of pointers in ZP in the crt0 file. They are read by a modification I made to neslib, and have to be written from by C code in my main module. Such pointers are defined as:
Those symbols I import from my main module:
But keep getting the warnings:
I even updated to the latest win32 snapshot of cc65, to no avail. Any pointers on what I'm doing wrong / what's missing?
Thanks.
It seems that tschak909 had the same problem here: viewtopic.php?p=211844#p211844 and got it sorted out, but the same solution doesn't work for me.
This is my issue:
I created a couple of pointers in ZP in the crt0 file. They are read by a modification I made to neslib, and have to be written from by C code in my main module. Such pointers are defined as:
Code:
.export _SCROLL_WRITE, _ATTRIB_WRITE
[...]
.segment "ZEROPAGE"
; [...] <- neslib stuff being defined here as in lots of "var .res N"
_SCROLL_WRITE: .res 2
_ATTRIB_WRITE: .res 2
[...]
.segment "ZEROPAGE"
; [...] <- neslib stuff being defined here as in lots of "var .res N"
_SCROLL_WRITE: .res 2
_ATTRIB_WRITE: .res 2
Those symbols I import from my main module:
Code:
extern unsigned char *SCROLL_WRITE;
#pragma zpsym ("SCROLL_WRITE")
extern unsigned char *ATTRIB_WRITE;
#pragma zpsym ("ATTRIB_WRITE")
#pragma zpsym ("SCROLL_WRITE")
extern unsigned char *ATTRIB_WRITE;
#pragma zpsym ("ATTRIB_WRITE")
But keep getting the warnings:
Code:
ld65: Warning: Address size mismatch for `_ATTRIB_WRITE': Exported from crt0.o, crt0-pantanow.s(81) as `zeropage', import in game.o, game.s(20597) as `absolute'
ld65: Warning: Address size mismatch for `_SCROLL_WRITE': Exported from crt0.o, crt0-pantanow.s(80) as `zeropage', import in game.o, game.s(20597) as `absolute'
ld65: Warning: Address size mismatch for `_SCROLL_WRITE': Exported from crt0.o, crt0-pantanow.s(80) as `zeropage', import in game.o, game.s(20597) as `absolute'
I even updated to the latest win32 snapshot of cc65, to no avail. Any pointers on what I'm doing wrong / what's missing?
Thanks.