
Since getting the GSLib example running I’ve been trying to set up a project in my own style. I’m fussy and I’ve developed my way of working so whenever I try to adapt a project I always break it down to how I like it. It has the benefit of forcing me to learn how the project actually builds.
It wasn’t entirely smooth sailing because I kept hitting linker errors again. This time, it looked like this:
?ASlink-Warning-Undefined Global 'GSL_TileLookup' referenced by module 'GSLib'
?ASlink-Warning-Undefined Global 'GSL_PositionWindow' referenced by module 'GSLib'
?ASlink-Warning-Undefined Global 'GSL_ActiveDisplayRoutine' referenced by module 'GSLib'
[...]
The linker couldn’t find labels inside the asm blocks of the functions inside GSLib.c. It was essentially complaining about GSLib.c not finding things in GSLib.c.
Turns out I had a --peep-asm flag in the makefile’s CFLAGS for the SDCC compiler and it didn’t gel well with GSLib.c. I couldn’t tell you where the flag came from. It was probably something I wanted to test a million years ago and the flag just hung around everytime I made a copy of the makefile.
As soon as I got that sorted setting up the rest of the project was straightforward. So now I’ve got the GSLib project building and running again, exactly the same as before except different.
Next step is to figure out how to get new assets into the example.
Leave a Reply