DerelictOrg and SDL_Mixer

Jack via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Nov 24 15:27:56 PST 2014


On Monday, 24 November 2014 at 21:19:40 UTC, torea wrote:
> Hi all,
>
> I'm playing a bit with D and SDL using DerelictOrg on debian 6. 
> I've installed SDL2, SDL_mixer2 and the latest packages 
> DerelictUtil and DerelictSDL2.
> I can display some stuffs and interact with the keys.
> Now I'm trying to add music and sounds but each time I try to 
> access a function from SDL_mixer ( I tried with Mix_openAudio 
> and Mix_LoadWav ), I get a segmentation fault.
> These functions are defined in the mixer.d file in the 
> DerelictSDL2 package but I guess I miss something concerning 
> the link to the real sdl_mixer lib file.
> Is there a specific way to install the sdl_mixer package with 
> DerelictSDL2?

It's a common error but did you load the Mixer and SDL libraries?
DerelictSDL2Mixer.load();
DerelictSDL2.load();

And some code or output from gdb would be most helpful.


More information about the Digitalmars-d-learn mailing list