Re: How can I build dynamic library with ldc in termux?

2019-03-02 Thread Domain via Digitalmars-d-learn
On Sunday, 3 March 2019 at 01:47:50 UTC, Domain wrote: /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lphobos2-ldc-shared /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -ldruntime-ldc-shared Any dub config example? ~> dub build Dynamic

How can I build dynamic library with ldc in termux?

2019-03-02 Thread Domain via Digitalmars-d-learn
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -lphobos2-ldc-shared /data/data/com.termux/files/usr/bin/aarch64-linux-android-ld: cannot find -ldruntime-ldc-shared

Re: Error 42: Symbol Undefined __D3std7process10spawnShellFNeMAxaMxHAyaAyaEQBpQBo6ConfigMQBbMQzZCQClQCk3Pid

2019-03-02 Thread Robert M. Münch via Digitalmars-d-learn
Ok, seems to be related to an older installed DMD 2.079.0, updating to 2.085.0 fixed the problem. Robert On 2019-03-02 21:15:05 +, Robert M. Münch said: Hi, trying to compile some stuff on Windows and get a bunch of undefined symbol errors, but these look as some standard modules are

Error 42: Symbol Undefined __D3std7process10spawnShellFNeMAxaMxHAyaAyaEQBpQBo6ConfigMQBbMQzZCQClQCk3Pid

2019-03-02 Thread Robert M. Münch via Digitalmars-d-learn
Hi, trying to compile some stuff on Windows and get a bunch of undefined symbol errors, but these look as some standard modules are missing. See full output at: https://pastebin.com/e9xLrQAF Any idea how this can happen? Or how to fix this? -- Robert M. Münch http://www.saphirion.com smarter

Re: Struct destructor

2019-03-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, March 2, 2019 4:32:53 AM MST JN via Digitalmars-d-learn wrote: > Compare this D code: > > import std.stdio; > > struct Foo > { > ~this() > { > writeln("Destroying foo"); > } > } > > void main() > { > Foo[string] foos; > > foos["bar"] = Foo(); >

Re: Struct destructor

2019-03-02 Thread Matheus via Digitalmars-d-learn
On Saturday, 2 March 2019 at 11:32:53 UTC, JN wrote: ... Is this proper behavior? I'd imagine that when doing foos.remove("bar"), Foo goes out of scope and should be immediately cleaned up rather than at the end of the scope? Or am I misunderstanding how should RAII work?

Struct destructor

2019-03-02 Thread JN via Digitalmars-d-learn
Compare this D code: import std.stdio; struct Foo { ~this() { writeln("Destroying foo"); } } void main() { Foo[string] foos; foos["bar"] = Foo(); writeln("Preparing to destroy"); foos.remove("bar"); writeln("Ending program"); } and equivalent C++ code: