DerelictOrg and SDL_Mixer

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Nov 25 17:26:00 PST 2014


On 11/26/2014 4:42 AM, torea wrote:

>
> ok, so basically, each time I want to access some specific functions
> imported like:
>    import derelict.sdl2.foo;
> I have to load it like this?
>    DerelictSDL2foo.load();

Don't think of it that way. Think of it this way: you have to load every 
library you want to use. SDL2_mixer is a library, SDL2_image is a 
library, SDL2_ttf is a library, and so on. You have to load them 
individually. DerelictSDL2 binds to SDL2, DerelictSDL2Mixer binds to 
SDL2_mixer and so on.

>
> After that I also got a SDL_mixer error : No such device.
> This was solved by installing libasound-dev and libpulse-dev and
> recompiling SDL2.
> Now I have sound!!

The Derelict packages are all just bindings to C libraries and nothing 
more. To use those libraries, you need to install their dependencies on 
each platform you need to use them on. If you don't know what the 
dependencies are, you should visit the website or support forums for 
that library.



More information about the Digitalmars-d-learn mailing list