Re: "is not an lvalue" when passing template function to spawn function

2023-11-08 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 8 November 2023 at 16:30:49 UTC, Bienlein wrote: Hello, I get the error "`addToBiz(T)(Biz!T biz)` is not an lvalue and cannot be modified" when compiling the code below. Can't find a way how to do it right. Am a D newbie and would appreciate some help. [...] static void a

"is not an lvalue" when passing template function to spawn function

2023-11-08 Thread Bienlein via Digitalmars-d-learn
Hello, I get the error "`addToBiz(T)(Biz!T biz)` is not an lvalue and cannot be modified" when compiling the code below. Can't find a way how to do it right. Am a D newbie and would appreciate some help. Thank you, Bienlein class Biz(T) { private T value; this(T value) {

Re: D: How would one make a shared dynamically linked D library?

2023-11-08 Thread Hipreme via Digitalmars-d-learn
On Wednesday, 8 November 2023 at 11:48:58 UTC, BoQsc wrote: I would like to export some functionality as external shared dynamically linked D library. Is it possible to do that in D Language and what are limitations? A simple `writeln` example would be great. What I expect is an executable

Re: D: How would one make a shared dynamically linked D library?

2023-11-08 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
Currently stick to ldc. Dub's defaults will "just work" except: - On *nix where you have to either set/patch the ``RPATH`` or set ``LD_LIBRARY_PATH``. - For executables on Windows in which you need to set the dflag ``-dllimport=all``. From a README of mine (for Posix): To get the loading

D: How would one make a shared dynamically linked D library?

2023-11-08 Thread BoQsc via Digitalmars-d-learn
I would like to export some functionality as external shared dynamically linked D library. Is it possible to do that in D Language and what are limitations? A simple `writeln` example would be great. What I expect is an executable that uses functions, variables, classes, modules from compiled