struggling to link against a C global in D (win/vs2017)

12345swordy alexanderheistermann at gmail.com
Mon Oct 29 16:24:50 UTC 2018


On Monday, 29 October 2018 at 00:16:38 UTC, Stanislav Blinov 
wrote:
> On Monday, 29 October 2018 at 00:01:21 UTC, DanielG wrote:
>
>> In my D app I'm declaring it this way:
>>
>> extern (C) {
>> 	extern __gshared int myIntValue;
>> 	int myIntFunc (int a, int b);
>> }
>>
>> The function seems to link OK, but the C global will not.
>
> Should it be extern(Windows), perchance?.. (I haven't D on 
> Windows for ages).

Nope, you use export.


More information about the Digitalmars-d-learn mailing list