core.stdc and betterC

rikki cattermole rikki at cattermole.co.nz
Sun Apr 29 15:14:25 UTC 2018


On 30/04/2018 3:05 AM, dd86k wrote:
> On Sunday, 29 April 2018 at 14:55:06 UTC, rikki cattermole wrote:
>> I just checked, extern(D) isn't at fault. You actually do want name 
>> mangling for wrapper functions like that.
> 
> Re-externing what I need as C is wasted productivity, IMO.
> 
>> Did you only -I the file? If you compile it in normally, it won't 
>> error out. Normally its compiled into druntime and hence Phobos.
> 
> Yeah, I am using core.stdc which _is_ from druntime indeed, but
> the hint here is _stdc_ (and more specifically, _std_).
> 
>> We really should have functions like this be templated (empty 
>> brackets) so that it'll work with just -I happily.
> 
> Really it's simply a betterC-related issue and thus why I
> proposed the insertion of some version (D_betterC) here and
> there.

This issue has nothing to do with -betterC or extern(D).
You can get this same issue without it added if you don't link against 
phobos/druntime.

It also isn't specific to core.stdc.*. Just your usage of it (-I'ing only).


More information about the Digitalmars-d mailing list