[SDL] SDL program crashing...

Gabriele Greco gabriele.greco at darts.it
Tue Apr 21 06:14:37 PDT 2009

On Tue, Apr 21, 2009 at 1:58 PM, Mike Mike <miketop0 at gmail.com> wrote:
> @ Gabriele :
>   Which library are the system libs?
Extracted from an "ldd" of an SDL app:

     libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d2c000)
     libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d06000)
     libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7d02000)
     libpulse-simple.so.0 => /usr/lib/libpulse-simple.so.0 (0xb7cf5000)
     libpulse.so.0 => /usr/lib/libpulse.so.0 (0xb7ca7000)
     libdirectfb-1.0.so.0 => /usr/lib/libdirectfb-1.0.so.0 (0xb7c44000)
     libfusion-1.0.so.0 => /usr/lib/libfusion-1.0.so.0 (0xb7c3c000)
     libdirect-1.0.so.0 => /usr/lib/libdirect-1.0.so.0 (0xb7c28000)
     libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7c10000)
     /lib/ld-linux.so.2 (0xb7f24000)
     libcap.so.1 => /lib/libcap.so.1 (0xb7c0c000)
     librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7c03000)
     libSM.so.6 => /usr/lib/libSM.so.6 (0xb7bfb000)
     libICE.so.6 => /usr/lib/libICE.so.6 (0xb7be2000)
     libX11.so.6 => /usr/lib/libX11.so.6 (0xb7afb000)
     libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7af9000)
     libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7ae1000)
     libXau.so.6 => /usr/lib/libXau.so.6 (0xb7ade000)

Now I see from your ./configure line that u don't use alsa, X11 and
ESD, but you use opengl and this will add for sure dependency to the
shared libGL.so, you'll also need for sure libpthread.so and probably
libdirectfb and libdirect, you'll also link for sure with ld-linux.so.

If your target is an embedded platform like it seems I don't see any
reason for a static compile, you'll end up with a larger and buggier
binary and you know in advance what libraries are available in your

Also, I've looked at your demo and I don't understand why you need
opengl in SDL if you don't use it! I'm quite sure that
SDL_Init(SDL_INIT_VIDEO) will try to open libGL.so also if you are
compiling static and you are not using SDL_OPENGL in your
SDL_SetVideoMode() flags.


More information about the SDL mailing list