Problems with SDL_Mixer on Mac

Mark Harviston infinull at gmail.com
Thu Mar 16 08:46:45 PST 2006


Anders F Björklund wrote:
> Mark Harviston wrote:
> 
>> sdl.audio imported fine.
>> sdl.mixer gave a link error:
>> /usr/bin/ld: Undefined Symbols:
>> --ModuleInfo_5mixer
>> collect2 ld returned with 1 exit status
> 
> 
> That would be a symbol from the D code.
> 
>> I know SDL_Mixer works, because I loaded the aliens example from the 
>> SDL website, and it uses SDL_Mixer.
>>
>> I know what the problem is now(the above is still valid)
>> the makefile is linking to the Framework and the *.os in the sdl/* 
>> local directory.
> 
> 
> That should be OK.
> 
>> If i link (-L/sw/lib) to the fink librarys, the mixer problems would 
>> seem to go away, but I am left with "can't locate file for: -lSDL_d",
>> so how do I get both in the same directory?
> 
> 
> You can add both of them, like this: -L . -L/sw/lib
> 
> SDL_d was just a lib that I did for the D "sdl/*.o",
> so you could add the object files instead of that one.
> 
>> can I copy the SDL_Mixer stuff from /sw/lib/?
>> what files do I copy?
> 
> 
> Better to leave Fink's SDL_Mixer dylibs in /sw/lib,
> but you can copy the "libSDL_d.a" to /usr/local/lib ?
> 
> 
> Hopefully I'll get some time to clean this up soon..
> 
> --anders
Thank you, but
make LDFLAGS="-L/sw/lib/ -L.
still gives me the __ModuleInfo_5mixer undefined error again
I have tried many variations, like:
make LDFLAGS="-L. -L./sdl/ -L/sw/lib"
so maybe that is not the problem.
ideas?
like I said I know C++ programs can link to it, so theres gotta be a way
for D programs to.
--Mark



More information about the D.gnu mailing list