[SDL] SDL program crashing...

Sami Näätänen sn.ml at keijukammari.fi
Tue Apr 21 04:41:09 PDT 2009

On Tuesday 21 April 2009 14:28:50 Sami Näätänen wrote:
> On Monday 20 April 2009 20:46:57 Mike Mike wrote:
> > Yh course, with pleasure.
> >
> > I have the source attached to this mail.
> >
> > Thanks in advance.
> Nice demo.
> I think your problem is the dlopen indicated by the gcc output of
> gcc -static test.c `sdl-config --cflags --static-libs`
> test.c: In function ‘main’:
> This is because I run 64bit OS.
> test.c:498: warning: format ‘%d’ expects type ‘int’, but argument 2 has
> type ‘long int’
> This is the most likely cause of your problem:
> /usr/local/lib/libSDL.a(SDL_alsa_audio.o): In function `ALSA_Init':
> SDL_alsa_audio.c:(.text+0x118): warning: Using 'dlopen' in statically
> linked applications requires at runtime the shared libraries from the glibc
> version used for linking
> The way around would be to give configure an additional option
> --enable-alsa-shared=no when building the SDL you use.

As I just found out you did not use audio in the demo, so you could disable 
alsa all together if you don't plan to use any audio.

Forgot to mention that I tested this on 64bit Gentoo with Gentoo provided SDL 
"libsdl-1.2.13-r1" and the program ran OK. but as it doesn't use audio, I 
can't confirm if the dlopen part will work.

More information about the SDL mailing list