Bug#374566: libsdl1.2-dev: sdl-config --static-libs omits many libs

Ben Pfaff blp at cs.stanford.edu
Mon Jun 19 23:44:36 UTC 2006


Package: libsdl1.2-dev
Version: 1.2.10-3

sdl-config --static-libs doesn't actually print many of the
libraries that are needed to statically link against SDL.  Here's
an example with a trivial test program:

    blp at sighup:~(0)$ cat tmp.c
    #include <SDL.h>
    #undef main /* We don't want SDL to override our main() */
    int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
    blp at sighup:~(0)$ gcc -static `sdl-config --cflags` tmp.c `sdl-config --static-libs` 2>&1 | head -10
    /usr/lib/libSDL.a(SDL_alsa_audio.o): In function `Audio_Available':
    (.text+0x93): undefined reference to `snd_pcm_open'
    /usr/lib/libSDL.a(SDL_alsa_audio.o): In function `Audio_Available':
    (.text+0xa2): undefined reference to `snd_pcm_close'
    /usr/lib/libSDL.a(SDL_alsa_audio.o): In function `ALSA_PlayAudio':
    (.text+0x25f): undefined reference to `snd_pcm_writei'
    /usr/lib/libSDL.a(SDL_alsa_audio.o): In function `ALSA_PlayAudio':
    (.text+0x298): undefined reference to `snd_pcm_resume'
    /usr/lib/libSDL.a(SDL_alsa_audio.o): In function `ALSA_PlayAudio':
    (.text+0x2b1): undefined reference to `snd_pcm_prepare'
    blp at sighup:~(0)$ sdl-config --static-libs
    -L/usr/lib -lSDL -lpthread

(I couldn't find an example of "sdl-config --static-libs" usage
anywhere, so possibly I misunderstand how it is meant to be
used.  Corrections welcome.)
-- 
"Ho ho ho. I _so_ enjoy making a fool out of myself."
--Linus, on Christmas Day, 2000




More information about the Pkg-sdl-maintainers mailing list