Use bindbc-sdl statically

russhy russhy at gmail.com
Sat Apr 24 16:02:27 UTC 2021


On Saturday, 24 April 2021 at 15:58:26 UTC, Ishax wrote:
> I am trying to get graphics working in D. All seems well with 
> bindbc sdl, but I hit a nitpick: I prefer to be able to create 
> a standalone executable when possible. I cannot get bindbc to 
> be happy with sdl .a files. It's a small problem, but if 
> there's a simple solution, I'm eager to hear it.

.a are object files for linux right?

for static usage make sure you remove the part of code where you 
manually loadSDL, since it is not needed for static compilation


make sure to use this subConfiguration: 
https://github.com/BindBC/bindbc-sdl#via-dub-subconfigurations


and then make sure to add the lib to link in your "lflags" or as 
a "sourceFiles", both will work

send us your dub.json file maybe some things are misconfigured?


More information about the Digitalmars-d-learn mailing list