Cannot compile betterC app in windows using stderr
Steven Schveighoffer
schveiguy at gmail.com
Wed Feb 2 14:19:24 UTC 2022
On 2/2/22 8:16 AM, Abby wrote:
> 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?
Well, looking at the blame for that file, those lines have been there
for 10 years, so that isn't the reason for the change.
-Steve
More information about the Digitalmars-d
mailing list