On Monday, 26 October 2020 at 21:38:39 UTC, Jack wrote:
I did consider do something like this but the class would only
live in the function's lifetime, right? that wouldn't work if I
need to pass the class around
Right, you'd have to manage the memory somehow. One possibility
is to malloc it
On Friday, 16 October 2020 at 03:42:22 UTC, Adam D. Ruppe wrote:
On Friday, 16 October 2020 at 03:04:25 UTC, Jack wrote:
How can I allocate memory for this class?
It is possible but not easy without druntime.
If you are using -betterC, you can use extern(C++) classes with
extern(D) members.
On Friday, 16 October 2020 at 03:04:25 UTC, Jack wrote:
How can I allocate memory for this class?
It is possible but not easy without druntime.
If you are using -betterC, you can use extern(C++) classes with
extern(D) members. The compiler will let you declare that. But
then you need to allo
On Friday, 16 October 2020 at 02:43:19 UTC, Paul Backus wrote:
On Thursday, 15 October 2020 at 22:02:11 UTC, Jack wrote:
can I make it work? the code (see below) result in link error:
lld: error: wasm.o: undefined symbol: _D4wasm1C7__ClassZ
lld: error: wasm.o: undefined symbol: _d_allocclass
E
On Thursday, 15 October 2020 at 22:02:11 UTC, Jack wrote:
can I make it work? the code (see below) result in link error:
lld: error: wasm.o: undefined symbol: _D4wasm1C7__ClassZ
lld: error: wasm.o: undefined symbol: _d_allocclass
Error: linking with LLD failed
command line:
ldc2 --d-debug -m
can I make it work? the code (see below) result in link error:
lld: error: wasm.o: undefined symbol: _D4wasm1C7__ClassZ
lld: error: wasm.o: undefined symbol: _d_allocclass
Error: linking with LLD failed
command line:
ldc2 --d-debug -mtriple=wasm32-unknown-unknown-wasm -betterC
wasm.d
ldc v