how do i fix this node_dlang error?

Jack jckj33 at gmail.com
Mon Jun 7 19:03:44 UTC 2021


On Monday, 7 June 2021 at 17:22:48 UTC, MoonlightSentinel wrote:
> On Monday, 7 June 2021 at 02:33:38 UTC, Jack wrote:
>> What am I missing?
>
> Does your code / `node_dlang` initialize Druntime before 
> calling `writeln`?

actually i didnt so I just added:

```d
shared static this()
{
	Runtime.initialize();
}

shared static ~this()
{
	Runtime.terminate();
}
```

but it didn't change anything


> Try replacing the `writeln` with `puts` (from 
> `core.stdc.stdio`) which doesn't require an initialized runtime.

I've tried just removed the writeln() call it didn't change 
anything either


More information about the Digitalmars-d-learn mailing list