Sdl_mixer/sdl_sound Linker Problem


Pickle

Mega GP Mania
Joined
May 30, 2006
Messages
5,527
Location
Detroit, Michigan
Website
Visit site
This linker problem has me stumped. All of this stuff worked on the mingw(windows) side with SDL_sound built as a dynamic dll/lib. Im using codeblocks and devkitGP2X.

I created the SDL_sound lib static library, i coped then placed it the lib folder for the devkit.
I put the SDL_sound.h in include/SDL

I then try to link my project that uses both SDL_mixer and SDl_sound and get these linker problems (I get 9 of these function linker problems total):
CODE

D:\Codeblocks_RC4\devkitGP2X\lib\libSDL_sound.a(playmidi.o):: In function `Timidity_Start':
:: Warning: size of symbol `Timidity_Start' changed from 460 in D:\Codeblocks_RC4\devkitGP2X\lib\libSDL_mixer.a(playmidi.o) to 36 in D:\Codeblocks_RC4\devkitGP2X\lib\libSDL_sound.a(playmidi.o)
D:\Codeblocks_RC4\devkitGP2X\lib\libSDL_sound.a(playmidi.o):: In function `Timidity_PlaySome':
:: Warning: size of symbol `Timidity_PlaySome' changed from 6936 in D:\Codeblocks_RC4\devkitGP2X\lib\libSDL_mixer.a(playmidi.o) to 2484 in D:\Codeblocks_RC4\devkitGP2X\lib\libSDL_sound.a(playmidi.o)



Here are my linker flags:
CODE

-static -lSDL_gfx -lSDL_ttf -lfreetype -lSDL_image -ljpeg -lpng12 -lz -lSDL_mixer -lvorbisidec -lmikmod -lmad -lSDL_sound -lSDL -lgcc -lm -lc -lexpat -lpthread -msoft-float
 
Pickle said:
yaustar said:
Have you tried a clean and build?
Just tried for both SDL_sound and xBak and linker problem still occurs.


Man this is annoying, the minute you think you have something working it breaks somewhere else. I dont see anything that im doing wrong with the building of this static lib.
I really could use help from anyone thats built lib from scratch.
 
Last edited by a moderator:
Pickle said:
Pickle said:
yaustar said:
Have you tried a clean and build?
Just tried for both SDL_sound and xBak and linker problem still occurs.


Man this is annoying, the minute you think you have something working it breaks somewhere else. I dont see anything that im doing wrong with the building of this static lib.
I really could use help from anyone thats built lib from scratch.


It works! Found a solution, I just had to rename all of those functions to something else. Sound isnt worling yet, but im getting into the SDL-sound functions, which is a start.
 
Last edited by a moderator:
joyrider said:
Hey, did you manage to get it working ? i'm getting the same kind of error messages when trying to staticly link SDL_Sound in a game. If so how did u fix it ? cause i think it should work without having to rename functions as well. or do i really have to do that as well ?

these are the errors, i'm getting :
http://users.pandora.be/IMS/misc/weirderrors.jpg



i figured it out , you have to compile SDL_Sound without timidity support and then it works (as long as the games don't use timidity using sdl_sound)

I edited config.h from sdl_sound after doing ./configure
and i changed
#define SOUND_SUPPORTS_MIDI 1
to
/* #undef SOUND_SUPPORTS_MIDI */
and then ran make again / make install again and copied over the libs over the previously compiled ones and it worked !
 
Last edited by a moderator:
joyrider said:
joyrider said:
Hey, did you manage to get it working ? i'm getting the same kind of error messages when trying to staticly link SDL_Sound in a game. If so how did u fix it ? cause i think it should work without having to rename functions as well. or do i really have to do that as well ?

these are the errors, i'm getting :
http://users.pandora.be/IMS/misc/weirderrors.jpg



i figured it out , you have to compile SDL_Sound without timidity support and then it works (as long as the games don't use timidity using sdl_sound)

I edited config.h from sdl_sound after doing ./configure
and i changed
#define SOUND_SUPPORTS_MIDI 1
to
/* #undef SOUND_SUPPORTS_MIDI */
and then ran make again / make install again and copied over the libs over the previously compiled ones and it worked !


good to hear, im still having problems with it on the GP2X side. For now ive stopped compiling it into XBak.
 
Last edited by a moderator:
Back
Top