Use bindbc-sdl statically

russhy russhy at gmail.com
Sat Apr 24 16:13:12 UTC 2021


On Saturday, 24 April 2021 at 16:10:13 UTC, Ishax wrote:
> On Saturday, 24 April 2021 at 16:02:27 UTC, russhy wrote:
>
>> .a are object files for linux right?
>
> Are they? I'm not very familiar with c++. I'm using windows. 
> For that matter I should mention I'm using dub in vscode.
>
>> send us your dub.json file maybe some things are misconfigured?
>
> ```sdl
> ...
> dependency "bindbc-sdl" version="~>0.1.0"
> versions "BindSDL_Static"
> sourceFiles "lib/libSDL2.a" "lib/libSDL_image.a"
> ```
> The following works fine but links dynamically:
> ```sdl
> ...
> dependency "bindbc-sdl" version="~>0.1.0"
> versions "BindSDL_Static"
> libs "SDL2" "SDL_image"
> ```

on windows, for static compilation you have to use "*.lib" files, 
not "*.a"

also you are missing the

```
subConfigurations "bindbc-sdl" "staticBC"
```



More information about the Digitalmars-d-learn mailing list