I am trying to statically link libsdl on a test I wrote. What I did is:

g++ test.cpp -Wl,-Bstatic  $(sdl-config --static-libs) -Wl,-Bdynamic

which gave me the error:

/usr/lib/x86_64-linux-gnu//libSDL.a(SDL_x11gl.o): In function`X11_GL_LoadLibrary':
(.text+0x703): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: cannot find -lasound
/usr/bin/ld: cannot find -lpulse-simple
/usr/bin/ld: cannot find -lpulse
collect2: error: ld returned 1 exit status

I added the line "-L/usr/lib/x86_64-linux-gnu/" (the directory where libasound.so resides), but nothing changed. Any solution?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.