Alternative SDL port as static library

Here are software that related with Samsung B series TVs. Like hex editors, new version of BusyBox or internal software, app programs that will run in your TV hardware.:!:This forum is NOT FOR USER QUESTIONS or Problems.

aquadran
Posts: 264
Joined: Fri Oct 16, 2009 9:35 pm
Location: Poland

Alternative SDL port as static library

Post by aquadran »

It's updated to newer version of SDL library.
It also has fixes to some bugs in original port.
Support for mouse and keyboard is added after load kernel modules for usb hid, events and also created device nodes at /dev/event0 ... 31
You can find it here: http://forum.samygo.tv/viewtopic.php?f=5&t=110

Download it from here: https://sourceforge.net/projects/samygo ... z/download new v0.03

Example application which use this library is port of ScummVM, you can find it here: http://forum.samygo.tv/viewtopic.php?f=5&t=91
Other static libraries can be found here: http://forum.samygo.tv/viewtopic.php?f=5&t=114&start=0
Changelog:

v0.03 - included missing sdl-config in package
v0.02 - enabled 8, 15, 16, 24 video support by internal sdl emulation buffer
v0.01 - initial version
Last edited by aquadran on Sun Nov 22, 2009 1:27 pm, edited 4 times in total.
User avatar
erdem_ua
SamyGO Admin
Posts: 3125
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: Alternative SDL port as static library

Post by erdem_ua »

Many thanks :)
aquadran
Posts: 264
Joined: Fri Oct 16, 2009 9:35 pm
Location: Poland

Re: Alternative SDL port as static library

Post by aquadran »

I hope more people will start making port of other SDL programs :)
aquadran
Posts: 264
Joined: Fri Oct 16, 2009 9:35 pm
Location: Poland

Re: Alternative SDL port as static library

Post by aquadran »

father-mande wrote:Hi,

Thanks for the lib ... I restart my test using this lib ...
do yuo have any information about the usage of SDL_ttf, do you know if it's possible to get them ?

thanks again.

Philippe.
SDL_ttf not exist tv, but why not compiling and use it :)
TV has SDL_mixer and SDL_image shared library and could be reused, or as with SDL compiling recent from sources and use as static library.

Regarding this port of SDL, I'm planning add internal gfx buffer to emulate video modes other 32 bit.
aquadran
Posts: 264
Joined: Fri Oct 16, 2009 9:35 pm
Location: Poland

Re: Alternative SDL port as static library

Post by aquadran »

Updated SDL library for support modes other than native 32 bit. It support now 8,15,16,24 now.
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: Alternative SDL port as static library

Post by arris69 »

father-mande wrote:Hi,

I am confused, because I try to link my prog (that run previously with shared lib) with static lib ... and fall in error

I use to compile & link this shell :

Code: Select all

#!/bin/sh
CPP=arm-linux-gnueabi-gcc
INCL=/opt/arm-linux-gnueabi/arm-linux-gnueabi/include
LIBS=`./sdl-config --libs`
SDLI=`./sdl-config --cflags`

echo "$CPP  $SDLI -c main.c "
$CPP $SDLI -c main.c 
echo "$CPP -o main.so -fpic -L$LIBS -lSDL main.o"
$CPP -static -o main.so -fpic -L$LIBS  -l SDL main.o
the error is during link :

Code: Select all

arm-linux-gnueabi-gcc -o main.so -fpic -L/opt/arm-linux-gnueabi/arm-linux-gnueabi/lib/libSDL.a -lpthread -lSDL main.o
/mnt/new_home/opt/arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/4.2.0/../../../../arm-linux-gnueabi/lib/crt1.o: In function `_start':
....
Can you help me .. I do lot of try and now ...I think it's a big mistake but I don't see it ??? :?: :oops: :oops:

Philippe.
seems linker missing the information that you want to build a shared object file an it try to link an executable for you (without a main function)

try:

Code: Select all

arm-linux-gnueabi-gcc `./sdl-config --cflags --libs` -fPIC -shared -o main.so main.c /opt/arm-linux-gnueabi/arm-linux-gnueabi/lib/libSDL.a
but first fix your sdl-config to give just the correct pathes and no libs back (than you have better control what to link where)
like:

Code: Select all

/sdl-config --cflags --libs
-I/home/Video-HD/Chelsea.gnueabi/build/tmp/staging/arm-linux-gnueabi/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
-L/home/Video-HD/Chelsea.gnueabi/build/tmp/staging/arm-linux-gnueabi/lib -lpthread
hth
arris
aquadran
Posts: 264
Joined: Fri Oct 16, 2009 9:35 pm
Location: Poland

Re: Alternative SDL port as static library

Post by aquadran »

arris69 wrote:
father-mande wrote:Hi,

I am confused, because I try to link my prog (that run previously with shared lib) with static lib ... and fall in error

I use to compile & link this shell :

Code: Select all

#!/bin/sh
CPP=arm-linux-gnueabi-gcc
INCL=/opt/arm-linux-gnueabi/arm-linux-gnueabi/include
LIBS=`./sdl-config --libs`
SDLI=`./sdl-config --cflags`

echo "$CPP  $SDLI -c main.c "
$CPP $SDLI -c main.c 
echo "$CPP -o main.so -fpic -L$LIBS -lSDL main.o"
$CPP -static -o main.so -fpic -L$LIBS  -l SDL main.o
the error is during link :

Code: Select all

arm-linux-gnueabi-gcc -o main.so -fpic -L/opt/arm-linux-gnueabi/arm-linux-gnueabi/lib/libSDL.a -lpthread -lSDL main.o
/mnt/new_home/opt/arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/4.2.0/../../../../arm-linux-gnueabi/lib/crt1.o: In function `_start':
....
Can you help me .. I do lot of try and now ...I think it's a big mistake but I don't see it ??? :?: :oops: :oops:

Philippe.
seems linker missing the information that you want to build a shared object file an it try to link an executable for you (without a main function)

try:

Code: Select all

arm-linux-gnueabi-gcc `./sdl-config --cflags --libs` -fPIC -shared -o main.so main.c /opt/arm-linux-gnueabi/arm-linux-gnueabi/lib/libSDL.a
but first fix your sdl-config to give just the correct pathes and no libs back (than you have better control what to link where)
like:

Code: Select all

/sdl-config --cflags --libs
-I/home/Video-HD/Chelsea.gnueabi/build/tmp/staging/arm-linux-gnueabi/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
-L/home/Video-HD/Chelsea.gnueabi/build/tmp/staging/arm-linux-gnueabi/lib -lpthread
hth
arris
actually it's better if --libs return like this:
/opt/arm-linux-gnueabi/arm-linux-gnueabi/lib/libSDL.a -lpthread

library which I uploaded has proper sdl-config, however after I split to binary and sources I forgot include into binary to prevent confusion.
I'll reupload it (done)

Post Reply

Return to “[B] Software”