Extern/scope issue

rikki cattermole rikki at cattermole.co.nz
Sat Apr 3 13:52:07 UTC 2021


On 04/04/2021 2:48 AM, DLearner wrote:
> On Saturday, 3 April 2021 at 13:38:25 UTC, rikki cattermole wrote:
>>
>> On 04/04/2021 2:34 AM, DLearner wrote:
>>> However, changing extern(C) to extern(D) causes linker failures.
>>> To me, that is bizarre.
>>
>> extern(D) sets the ABI AND mangling.
>>
>> D mangling incorporates things like the module name.
> 
> I'm sure you are correct, but extern(C) -> extern(D) in both references.
> So both source streams are aware of the convention used.

https://dlang.org/spec/abi.html#name_mangling


More information about the Digitalmars-d-learn mailing list