Sdl On Unoffical Sdk


7zark7

Member
Joined
Nov 24, 2005
Messages
124
thanks for the Unoffical SDK , it has really helped me , I have managed to compile a basic hello world from codeblocks using this SDK and it works.

copied it across the pandora and executed it as a console app :) small victories ha ha.

Now I have tried to write a small piece of SDL code working from one of the tutorials on the Pandora Wiki.

I have included /usr/local/pandora/arm-2009q3/usr/include/SDL in the compiler search path and have included usr/local/pandora/arm-2009q3/usr/include/SDL in the linker search path.

I got a few undefined errors on SDL functions, such as obj/Debug/main.o||In function `main':|
main.c:(.text+0x28)||undefined reference to `SDL_Init'|
main.c:(.text+0x3c)||undefined reference to `SDL_SetVideoMode'|

So i thought maybe I need to link in the SDL library itself in the linker section, so I included this.

/usr/local/pandora/arm-2009q3/usr/lib/libSDL.so

Now I am getting

||warning: libts-1.0.so.0, needed by /usr/local/pandora/arm-2009q3/usr/lib/libSDL.so, not found (try using -rpath or -rpath-link)|
/usr/local/pandora/arm-2009q3/usr/lib/libSDL.so||undefined reference to `ts_close'|
/usr/local/pandora/arm-2009q3/usr/lib/libSDL.so||undefined reference to `ts_config'|
/usr/local/pandora/arm-2009q3/usr/lib/libSDL.so||undefined reference to `ts_read'|
/usr/local/pandora/arm-2009q3/usr/lib/libSDL.so||undefined reference to `ts_open'|
/usr/local/pandora/arm-2009q3/usr/lib/libSDL.so||undefined reference to `ts_fd'|

Whilst I can find the libts library and add a entry for this as well, am I doing the correct thing or have I missed something obvious that I should have done .

7Zark7
 
A few things comes to my mind (i have had a similar problem myself); you need to have libts entry before the sdl one. (ie -lts -lsdl and not -lsdl -lts) that did the trick for me anyway.
You can also check if your libts file is actually named libts-1.0.so.0 (or if there is a symlink with that name that links to libts-1.0.so)
 
I wanna try to port something on Pandora...
could you give step by step info on how to properly setup Codeblocks and SDL (or other libs ) ..?

Thank you.
 
Back
Top