Using bindbc-sdl with D
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Sun Mar 12 03:39:59 UTC 2023
On 12/03/2023 4:27 PM, idsize wrote:
> On Sunday, 12 March 2023 at 02:24:31 UTC, Richard (Rikki) Andrew
> Cattermole wrote:
>> If you add the appropriate versions and copy the files to your project
>> directory (including bindbc-loader) that should work however as long
>> as you compile it in.
>
> I've never used a package manager before so the entire process of using
> one is still strange to me. When using SDL2 with C, I have all of the
> SDL2 files within my MinGW install. To compile I use 'gcc example.c
> -lmingw32 -lSDL2 -lSDL2main'. Could I use a method similar to that?
Yeah pretty much the same thing in principle.
Pass the D files to the compiler (including the bindings, dynamic
bindings are not like headers, they load the DLL at runtime not during
linking like static bindings), tell it the versions needed for the
bindings and it should work.
When you do a successful build with the verbose flag it'll tell you what
commands were used to build and link it. That should give you some
pointers of what is required (although there will be extra
flags/versions specified that you probably won't need).
More information about the Digitalmars-d-learn
mailing list