I'm completely befuddled with compiling, linking, binding, etc.
WhatMeWorry
kheaser at gmail.com
Wed Mar 18 01:08:52 UTC 2026
I'm using DUB's bindbc-sdl. I'm dynamically loading sdl3.dll
which I've renamed.
trying to load SDL3 dynamic link library:
C:\Users\kheas\OneDrive\Documents\GitHub\Dfine\libraries\SDL3_3_4_2.dll
loadSDL returned: success
Searching for SDL on Windows
3004002
Your SDL version loaded was: 3.4.2
SDL_Init returned: true
So, I read that SDL_Surface* SDL_LoadPNG(const char *file); was
introduced in SDL3 version 3.4.0. So I think yippie! I've got
this already, I've loaded 3.4.2. No more SDL_image.
So I add the function call:
SDL_Surface* sur = SDL_LoadPNG("test.png");
which returns:
libraries\load_sdl_libraries.d(117,24): Error: undefined
identifier `SDL_LoadPNG`
SDL_Surface* sur = SDL_LoadPNG("test.png");
So I then add:
import bindbc.sdl : SDL_Surface, SDL_LoadPNG;
which then returns,
libraries\load_sdl_libraries.d(14,8): Error: module `bindbc.sdl`
import `SDL_LoadPNG` not found import bindbc.sdl : SDL_Surface,
SDL_LoadPNG;
I have the dub.sdl with what the docs say are most current.
Double checked, SDL_LoadPNG is the correct name of the function.
dependency "bindbc-sdl" version="~>2.3.4" // latest in the
bindbc-sdl documentation
dependency "bindbc-loader" version="~>1.1.5" // latest in the
bindbc-loader documentation
versions "SDL_3_4_2", // latest in the
bindbc-sdl documentation
I'm stuck as to what to do next. Thanks in advance.
More information about the Digitalmars-d-learn
mailing list