Creating weak symbols with D

Jacob Carlborg doob at
Sun Aug 9 17:23:46 UTC 2020

On 2020-08-08 20:14, Stefan Koch wrote:

> Out of interested where do you find yourself needing to specify weak 
> linkage?

I don't know about Andrei's use case, but weak linkage is vital to be 
able to create proper bindings to Apple's SDks. The SDK use weak linkage 
for most symbols. This allows to link with the latest version of the 
SDK, which might have added new symbols, while still targeting older 
versions of the platform. The application then needs to check if a 
symbol is available or not on the currently running platform.

/Jacob Carlborg

More information about the Digitalmars-d mailing list