October 29, 2018 Re: struggling to link against a C global in D (win/vs2017) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stanislav Blinov | 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.
|
Copyright © 1999-2021 by the D Language Foundation