linker errors with SDL + libogc

Post Reply
User avatar
bread
Posts: 2
Joined: Sun Jun 03, 2018 12:54 am

linker errors with SDL + libogc

Post by bread » Mon Jun 11, 2018 1:59 pm

I am trying to get a simple SDL example running, but on linking I get this error:
linking ... game.elf
C:/Users/Bread/dev/GameCube/projects/game/thirdparty/SDL/SDL/lib\libSDL.a(SDL_string.o): In function `SDL_vsnprintf':
SDL_string.c:(.text.SDL_vsnprintf+0x92): undefined reference to `__ctype_ptr__'
SDL_string.c:(.text.SDL_vsnprintf+0x272): undefined reference to `__ctype_ptr__'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [C:\Users\Bread\dev\devkitPro\devkitPPC/gamecube_rules:25: /home/Bread/dev/GameCube/projects/game/bin/game.elf] Error 1
make: *** [Makefile:103: build] Error 2
The terminal process terminated with exit code: 1
My LIBS:
LIBS := -lSDL_gfx -lSDL_ttf -lSDL_mixer -lvorbisidec -lSDL_image -lpng16 -lSDL -lfat -lz -logc -lm
some googling told me to try adding libg but that doesn't help.

Admittedly I had some trouble figuring out where to find the gamecube sdl port. It didn't look like the devkitPro github mirror had cube support to me, and it seemed difficult to compile on windows.
I grabbed it from here: https://sourceforge.net/projects/gcsdl12/
So, if this issue is due to me having an old version I could use some direction on where/how to find/setup latest cube sdl.

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: linker errors with SDL + libogc

Post by WinterMute » Tue Jun 12, 2018 3:46 pm

The library needs rebuilt with latest tools and ideally should have been refactored to use the configury so it's actually maintainable.

Unfortunately nobody has ever got around to fixing it properly so right now it isn't in the devkitPro SDL ports nor is it packaged.

There was an attempt made here https://devkitpro.org/viewtopic.php?f=41&t=2920 quite some time ago but I think it was abandoned in the end. There may be some hints in that thread which would help and I'd be willing to lend assistance if you wanted to try getting the code maintainable and packaged. I don't have time right now to do the whole thing unfortunately.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests