Derelict / SDL error

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Dec 9 07:40:01 PST 2014


On 12/10/2014 12:19 AM, Paul wrote:
>
> I don't fancy introduing another layer of complexity in a debugger at
> present! I  wonder if it's the .bmp that's causing the problem. I can't
> quite figure how to get Derelict SDL_Image into my project at present
> (dub doesn't fetch it if I add import derelict.sdl.image; ) otherwise
> I'd try a png or something. Can't really see it being that anyway but
> worth a try I suppose.

dub doesn't know anything about DerelictSDL2Image (and even if it did, 
just importing it isn't going to tell dub about it -- you would need to 
add it to your dub.json as a dependency). That's because 
DerelictSDL2Image is not an independent package. It's part of 
DerelictSDL2. You need to call DerelictSDL2Image.load() to load the 
SDL2_image shared library, then you can use it.



More information about the Digitalmars-d-learn mailing list