Cannot compile betterC app in windows using stderr

Abby abby at gmail.com
Wed Feb 2 13:16:47 UTC 2022


On Wednesday, 2 February 2022 at 12:17:01 UTC, kinke wrote:
> On Wednesday, 2 February 2022 at 07:33:58 UTC, Basile B. wrote:
>> ```d
>> else version (CRuntime_Microsoft)
>> {
>>     ///
>>     shared FILE* stdin;  // = &__iob_func()[0];
>>     ///
>>     shared FILE* stdout; // = &__iob_func()[1];
>>     ///
>>     shared FILE* stderr; // = &__iob_func()[2];
>> }
>> ```
>>
>> shouldn't these variable declarations be `extern` ?
>
> Nope, they are macros in the MSVC headers, no symbols are 
> available. That's why druntime defines them and sets them up at 
> startup, so they aren't available/linked with `-betterC`.

Thank you very much, do you know which lib should be linked and 
why it all works in dmd-2.091.0?


More information about the Digitalmars-d mailing list