bindbc, SDL

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu Mar 27 14:10:21 UTC 2025


On 28/03/2025 3:06 AM, Claus D. Volko wrote:
> On Thursday, 27 March 2025 at 07:40:38 UTC, ryuukk_ wrote:
>> If you are using the shared library instead of the static library, you 
>> need to load it, call the `loadSDL` function
> 
> Judging from what's written on https://en.wikipedia.org/wiki/ 
> Shared_library it should actually be a static library as it's a .lib 
> file. Maybe the reason for the problem is that I compiled the library in 
> Release mode while I built the D project in Debug mode? Anyway, I'll 
> also try using the loadSDL function, thank you for the advice.

Shared libraries on Windows (DLL)'s, produce when linked an import 
library that happens to be a static library.

You link to the import library when you want to link against the shared 
library during compilation. It provides the information to the linker 
that it needs for this process.

The bindbc family of packages, usually can link against a shared library 
both during compilation (statically), or during runtime (dynamically).

The import library serves no purpose if you are linking dynamically.



More information about the Digitalmars-d-learn mailing list