GP2X Sdl Static Linking Confusion


fishybawb

Hired Geek
Joined
Jul 22, 2005
Messages
1,115
Age
44
Location
York, UK
Website
Visit site
I did post before about some sound troubles I was having with SDL and sound, so instead of trusting my own code, I gave someone else's a go ;)

NK's emu dynamically links with:

'sdl-config --cflags --libs' -lstd++ -static-libgcc (I stripped his font and SDL_image library out)

If I add -static to that, it'll all compile/link fine, but there's no sound when I run the executable! Why? :(
 
fishybawb posted on Feb 6 2006 at 12:10 PM said:
I did post before about some sound troubles I was having with SDL and sound, so instead of trusting my own code, I gave someone else's a go ;)

NK's emu dynamically links with:

'sdl-config --cflags --libs' -lstd++ -static-libgcc (I stripped his font and SDL_image library out)

If I add -static to that, it'll all compile/link fine, but there's no sound when I run the executable! Why? :(

How is it opening the sound device?
 
Last edited by a moderator:
fishybawb posted on Feb 6 2006 at 04:21 PM said:
I haven't got access to the source at the minute, but it's using "normal" SDL audio, not SDL_mixer.
Sorry, I hadn't picked that up. I have only ever used SDL_mixer.
 
Last edited by a moderator:
I found statically linking a mass of libraries a nightmare. I finally got one single LDFLAGS line in a makefile that worked... now I am afraid to change it :p

I might be wrong, but wouldn't you need to add
"-lSDL_mixer -lvorbisfile -lvorbis -logg"
to the compile flags to get sound support?

Anways good luck with it all. Sorry I can't help more.

EDIT:
....it's using "normal" SDL audio, not SDL_mixer
Oops, I just saw this after I posted. I guess my flags won't help much then ;)
 
Back
Top