Can't load SDL3_image from the dub package bindbc-sdl

WhatMeWorry kheaser at gmail.com
Fri Apr 3 00:00:06 UTC 2026


I've looked throughout github for examples and read the 
documentation more times than I care to admit.

================== dub.sdl ====================

dependency "bindbc-sdl" version="~>2.3.4"
versions "SDL_3_4_2"  "SDL_Image_3_2"

================== Code ========================

pathAndFileName = pathToLibs ~ "SDL3_image.dll";
if (exists(pathAndFileName))  // returns true for files or 
directories
{
     if (isFile(pathAndFileName)) // verify it is actually a file
     {
         writeln("Found the SDL Image dll file at: ");
         writeln(pathAndFileName);
     }
}
LoadMsg imgRet = loadSDLImage(pathAndFileName.toStringz());	
writeln("imgRet = ", imgRet);

=================== Output ========================

Loading SDL dll file at:
C:\Users\kheaser\Documents\GitHub\Dfine\libraries\SDL3_3_4_2.dll
SDL version loaded was: 3.4.2
SDL_Init was successful:

Found the SDL Image dll file at:
C:\Users\kheaser\Documents\GitHub\Dfine\libraries\SDL3_image.dll
imgRet = noLibrary

The code checks for the existence of SDL3_image.dll file so the 
library
file is there.  When I go into properties of SDL3_image.dll file,
Product version shows 3,2,0,0.  I also verified that 
SLD3_image.dll is 64-bit.

I have no ideas on how to proceed. Any suggestions? Thanks.







More information about the Digitalmars-d-learn mailing list