I’m getting lots of this while trying to link PokittoSim on a Mac:
Undefined symbols for architecture x86_64:
"Pokitto::lcdRectangle(short, short, short, short, unsigned short)", referenced from:
Pokitto::Display::directRectangle(short, short, short, short, unsigned short) in PokittoDisplay.o
ld: symbol(s) not found for architecture x86_64
I’ve tried changing between stdlibc and libc, but no go.
Also, SDL2 test programs can be compiled and linked separately so I know the SDL2 I’ve built is OK
Console applications compile and link from inside CB without issues
I know enough to have suspicions that either some libs are not built for the right version or something, but perhaps someone has already tried this (compiling PokittoSim on a Mac) ?
Since the complaint is about a
.o file this is most likely a link-level error.
If the root issues are related to SDL2 it’s probably an incorrect static lib or a missing static lib.
I’m assuming SDL2 being changed to the mac version is the only change you’ve made and all the Pokitto Sim code is the same?
No its something different here. I’ve been extracting the symbols with objdump (or gobjdump as installed using brew) and something funky is going on
Are all the undefined symbols
Also which compiler is Code::Blocks using?
(I found a few things saying that using
gcc might cause issues and using
g++ would sort that.)
Ok, so the problem was I was trying to use the original PokittoSim repo which was broken and resulted in missing symbols.
Then I cloned the current PokittoLib
Before summer I was told Pokitto with Code::Blocks was difficult to get to work on a Mac
now I’m like why??? (edit: not intended as a smug remark. i just mean that it was not at all complicated, and I dont know what the issue was)
I downloaded C::B 13.12
installed SDL2 runtimes
deleted all linker settings
put -lSDL2 in linker options
and it works out of the box (but sound will crash as on linux, but I will take a look at that)