I'm trying to use the node_dlang pakckage but the code example
from [this
repo](https://github.com/NotSpooky/node_dlang/tree/v0.4.11/examples) isn't working
the command ```dub build``` is fine but ```node example.js```
retuns an error saying the module.node is not a valid win32
application. H
On Sunday, 6 June 2021 at 04:25:39 UTC, Jack wrote:
I'm trying to use the node_dlang pakckage but the code example
from [this
repo](https://github.com/NotSpooky/node_dlang/tree/v0.4.11/examples) isn't working
the command ```dub build``` is fine but ```node example.js```
retuns an error saying
On Sunday, 6 June 2021 at 06:10:18 UTC, Mike Parker wrote:
On Sunday, 6 June 2021 at 04:25:39 UTC, Jack wrote:
I'm trying to use the node_dlang pakckage but the code example
from [this
repo](https://github.com/NotSpooky/node_dlang/tree/v0.4.11/examples) isn't working
the command ```dub build`
On Sunday, 6 June 2021 at 06:10:18 UTC, Mike Parker wrote:
On Sunday, 6 June 2021 at 04:25:39 UTC, Jack wrote:
I'm trying to use the node_dlang pakckage but the code example
from [this
repo](https://github.com/NotSpooky/node_dlang/tree/v0.4.11/examples) isn't working
the command ```dub build`
On Sunday, 6 June 2021 at 15:42:55 UTC, Jack wrote:
0.4.11\node_dlang\source\node_dlang.d(137,11): Error: none of the
overloads of `this` are callable using argument types `(string,
string, ulong, Throwable)`, candidates are:
C:\D\dmd2\windows\bin\..\..\src\druntime\import\object.d(2440,30):
On Sunday, 6 June 2021 at 04:25:39 UTC, Jack wrote:
I'm trying to use the node_dlang pakckage but the code example
from [this
repo](https://github.com/NotSpooky/node_dlang/tree/v0.4.11/examples) isn't working
the command ```dub build``` is fine but ```node example.js```
retuns an error saying
On Sunday, 6 June 2021 at 17:32:57 UTC, Mike Parker wrote:
On Sunday, 6 June 2021 at 15:42:55 UTC, Jack wrote:
0.4.11\node_dlang\source\node_dlang.d(137,11): Error: none of
the overloads of `this` are callable using argument types
`(string, string, ulong, Throwable)`, candidates are:
[...]
T
On Sunday, 6 June 2021 at 21:44:44 UTC, NotSpooky wrote:
On Sunday, 6 June 2021 at 04:25:39 UTC, Jack wrote:
I'm trying to use the node_dlang pakckage but the code example
from [this
repo](https://github.com/NotSpooky/node_dlang/tree/v0.4.11/examples) isn't working
the command ```dub build```
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`?
Try replacing the `writeln` with `puts` (from `core.stdc.stdio`)
which doesn't require an initialized runtime.
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.
On Monday, 7 June 2021 at 02:33:38 UTC, Jack wrote:
What am I missing?
If this runs under Windows, there is no dlopen(), maybe a wrapper
to LoadLibrary() but this will need to call a DllMain() in the
DLL if I am not wrong. Is there a DllMain?
On Monday, 7 June 2021 at 19:03:44 UTC, Jack wrote:
actually i didnt so I just added:
```d
shared static this()
{
Runtime.initialize();
}
shared static ~this()
{
Runtime.terminate();
}
```
but it didn't change anything
That doesn't work because `Runtime.initialize()` is respo
On Monday, 7 June 2021 at 20:13:03 UTC, frame wrote:
On Monday, 7 June 2021 at 02:33:38 UTC, Jack wrote:
What am I missing?
If this runs under Windows, there is no dlopen(), maybe a
wrapper to LoadLibrary() but this will need to call a DllMain()
in the DLL if I am not wrong. Is there a DllM
On Monday, 7 June 2021 at 20:13:03 UTC, frame wrote:
On Monday, 7 June 2021 at 02:33:38 UTC, Jack wrote:
What am I missing?
If this runs under Windows, there is no dlopen(), maybe a
wrapper to LoadLibrary() but this will need to call a DllMain()
in the DLL if I am not wrong. Is there a DllM
On Monday, 7 June 2021 at 20:37:19 UTC, MoonlightSentinel wrote:
On Monday, 7 June 2021 at 19:03:44 UTC, Jack wrote:
actually i didnt so I just added:
```d
shared static this()
{
Runtime.initialize();
}
shared static ~this()
{
Runtime.terminate();
}
```
but it didn't change an
On Monday, 7 June 2021 at 22:24:03 UTC, Jack wrote:
I think the entry point function is ```void atStart(napi_env
env) {}``` so there's no DllMain...
DLLMain is not strictly required. It's called by the system
loader when the DLL is first loaded into the process. The
MainFunction for node is
On Tuesday, 8 June 2021 at 00:00:50 UTC, Mike Parker wrote:
On Monday, 7 June 2021 at 22:24:03 UTC, Jack wrote:
I think the entry point function is ```void atStart(napi_env
env) {}``` so there's no DllMain...
DLLMain is not strictly required. It's called by the system
loader when the DLL is
On Tuesday, 8 June 2021 at 00:58:12 UTC, Jack wrote:
the dll which I was just build with dub command? how I have a
version mismatch if they're the very same file?
Electron embeds node and does not use whatever you have on your
system. So if there’s a mismatch between the embedded version and
On Tuesday, 8 June 2021 at 03:04:39 UTC, Mike Parker wrote:
On Tuesday, 8 June 2021 at 00:58:12 UTC, Jack wrote:
the dll which I was just build with dub command? how I have a
version mismatch if they're the very same file?
Electron embeds node and does not use whatever you have on your
syste
On Tuesday, 8 June 2021 at 03:04:39 UTC, Mike Parker wrote:
On Tuesday, 8 June 2021 at 00:58:12 UTC, Jack wrote:
the dll which I was just build with dub command? how I have a
version mismatch if they're the very same file?
Electron embeds node and does not use whatever you have on your
syste
On Tuesday, 8 June 2021 at 04:56:27 UTC, NotSpooky wrote:
On Tuesday, 8 June 2021 at 03:04:39 UTC, Mike Parker wrote:
On Tuesday, 8 June 2021 at 00:58:12 UTC, Jack wrote:
[...]
Electron embeds node and does not use whatever you have on
your system. So if there’s a mismatch between the embed
21 matches
Mail list logo