How to cross build a RISC-V target betterC code using LDC on x86-64 machine

2021-06-05 Thread lili via Digitalmars-d-learn
I have used to ldc2(1.20.1) on x86-64 laptop with `ldc2 -c -betterC -mtriple=riscv64 betterC.d -v ` but comiple is failed. output: ``` binary/usr/bin/ldc2 version 1.20.1 (DMD v2.090.1, LLVM 10.0.0) config/etc/ldc2.conf (riscv64) 'generic' is not a recognized processor for this targ

Re: how do i fix this node_dlang error?

2021-06-05 Thread Mike Parker via Digitalmars-d-learn
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

Re: Now can build and run d on RISC-V arch?

2021-06-05 Thread lili via Digitalmars-d-learn
On Sunday, 6 June 2021 at 04:53:08 UTC, Nicholas Wilson wrote: On Sunday, 6 June 2021 at 04:14:20 UTC, lili wrote: I want learn RISC-V and write a simple kernel on it using d. but can not find any support about RISC-V. LDC can compile for riscv 32 and 64 bit. https://github.com/ldc-developers

Re: Now can build and run d on RISC-V arch?

2021-06-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 6 June 2021 at 04:14:20 UTC, lili wrote: I want learn RISC-V and write a simple kernel on it using d. but can not find any support about RISC-V. LDC can compile for riscv 32 and 64 bit. https://github.com/ldc-developers/ldc/releases/tag/v1.26.0 use `-mtriple=riscv32` or `-mtriple=r

how do i fix this node_dlang error?

2021-06-05 Thread Jack via Digitalmars-d-learn
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

Now can build and run d on RISC-V arch?

2021-06-05 Thread lili via Digitalmars-d-learn
I want learn RISC-V and write a simple kernel on it using d. but can not find any support about RISC-V.

Re: opDispatch not working

2021-06-05 Thread Mike Brown via Digitalmars-d-learn
On Saturday, 5 June 2021 at 15:23:09 UTC, drug wrote: 05.06.2021 18:15, Mike Brown пишет: [...] incomplete `cast` I would say. You did: ```D mixin("cast(T*)obj."~name)(vals); ``` instead of ```D mixin("(cast(T*)obj)."~name)(vals); ``` i.e. you try to call method `test` using a pointer to void

opDispatch not working

2021-06-05 Thread Mike Brown via Digitalmars-d-learn
Hi All, Im still experimenting with WASM and D - I really would like to be able to use reference types. I think I can get there with the metaprogramming abilities in D. I'm trying to get the foundations right, I need a reference-like handle - which I've named "ptr". I'm trying to see how I c

Re: How to compile Phobos with other D code to create a shared library?

2021-06-05 Thread data pulverizer via Digitalmars-d-learn
On Friday, 4 June 2021 at 15:19:17 UTC, bachmeier wrote: It requires an R package if you want to call D functions from R. You need to link to R itself if you want to do something like pass a vector from R to D and then access that data from D. Since R is aware of the location of all the under