Page 1 of 3
Alternative SDL port as static library
Posted: Tue Nov 17, 2009 6:37 pm
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
Re: Alternative SDL port as static library
Posted: Tue Nov 17, 2009 9:03 pm
by erdem_ua
Many thanks

Re: Alternative SDL port as static library
Posted: Tue Nov 17, 2009 9:09 pm
by aquadran
I hope more people will start making port of other SDL programs

Re: Alternative SDL port as static library
Posted: Wed Nov 18, 2009 12:28 am
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.
Re: Alternative SDL port as static library
Posted: Wed Nov 18, 2009 11:55 am
by aquadran
Updated SDL library for support modes other than native 32 bit. It support now 8,15,16,24 now.
Re: Alternative SDL port as static library
Posted: Fri Nov 20, 2009 7:28 pm
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 ???
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
Re: Alternative SDL port as static library
Posted: Fri Nov 20, 2009 8:26 pm
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 ???
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)