How to set a global var to a user defined section.

kinke noone at
Tue Aug 20 18:18:23 UTC 2019

On Tuesday, 20 August 2019 at 17:33:17 UTC, lili wrote:
> Hi:
>   With gcc we can use  _ attribute _((section("name")) var; how 
> to same in dlang?

As for C(++), not standardized in the language itself. With LDC:

import ldc.attributes : section;

__gshared int myGlobal;

More information about the Digitalmars-d-learn mailing list