Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Seb via Digitalmars-d-learn
On Monday, 2 July 2018 at 23:00:08 UTC, Chris M. wrote: On Monday, 2 July 2018 at 21:20:26 UTC, Seb wrote: On Monday, 2 July 2018 at 19:24:38 UTC, Chris M. wrote: On Monday, 2 July 2018 at 18:48:16 UTC, Jonathan M Davis wrote: [...] Downloaded the DMD and DMC zip files, extracted and added t

how to create an array of scoped objects ?

2018-07-02 Thread Flaze07 via Digitalmars-d-learn
e.g A is a class that emits output during destruction { auto a = scoped!A(); } how do I contain it in a container, in the Array struct ? { auto a = scoped!A(); Array!( typeof( a ) ) arr; foreach( i ; 0..3 ) { arr.insertBack( scoped!A ); } } is that how you do it ?

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Mike Parker via Digitalmars-d-learn
On Monday, 2 July 2018 at 23:00:08 UTC, Chris M. wrote: On Monday, 2 July 2018 at 21:20:26 UTC, Seb wrote: I thought for 64-bit the bundled lld linker and mingw runtime are used? https://dlang.org/changelog/2.079.0.html#lld_mingw So in fact you shouldn't even need DMC? Ah, okay. I'm mostly

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Chris M. via Digitalmars-d-learn
On Monday, 2 July 2018 at 21:20:26 UTC, Seb wrote: On Monday, 2 July 2018 at 19:24:38 UTC, Chris M. wrote: On Monday, 2 July 2018 at 18:48:16 UTC, Jonathan M Davis wrote: On Monday, July 02, 2018 18:26:27 Chris M. via Digitalmars-d-learn wrote: On Monday, 2 July 2018 at 17:33:20 UTC, Bauss wro

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, July 02, 2018 21:20:26 Seb via Digitalmars-d-learn wrote: > On Monday, 2 July 2018 at 19:24:38 UTC, Chris M. wrote: > > On Monday, 2 July 2018 at 18:48:16 UTC, Jonathan M Davis wrote: > >> On Monday, July 02, 2018 18:26:27 Chris M. via > >> > >> Digitalmars-d-learn wrote: > >>> On Monday

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Seb via Digitalmars-d-learn
On Monday, 2 July 2018 at 19:24:38 UTC, Chris M. wrote: On Monday, 2 July 2018 at 18:48:16 UTC, Jonathan M Davis wrote: On Monday, July 02, 2018 18:26:27 Chris M. via Digitalmars-d-learn wrote: On Monday, 2 July 2018 at 17:33:20 UTC, Bauss wrote: > [...] Thanks for checking, I have no idea wha

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Chris M. via Digitalmars-d-learn
On Monday, 2 July 2018 at 18:48:16 UTC, Jonathan M Davis wrote: On Monday, July 02, 2018 18:26:27 Chris M. via Digitalmars-d-learn wrote: On Monday, 2 July 2018 at 17:33:20 UTC, Bauss wrote: > On Monday, 2 July 2018 at 12:53:19 UTC, Chris M. wrote: >> [...] > > If I don't get around it tonight t

Re: Dynamic arrays / ~= giving an exception...

2018-07-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, July 02, 2018 14:46:28 Steven Schveighoffer via Digitalmars-d- learn wrote: > It should work. We need more context to try and help figure it out. Even > if you can't post the entire program, maybe more context from mystruct. If the program size is too large to show a good example, then

Re: Dynamic arrays / ~= giving an exception...

2018-07-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/1/18 4:55 PM, Robert M. Münch wrote: I'm a bit puzzled because I think this is pretty straight forward but doesn't work... struct mystruct { myPtr* root; opApply(...){     myPtr*[] childs;     childs ~= root;     ... } } foreach(node; mystruct(myRoot)){   

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, July 02, 2018 18:26:27 Chris M. via Digitalmars-d-learn wrote: > On Monday, 2 July 2018 at 17:33:20 UTC, Bauss wrote: > > On Monday, 2 July 2018 at 12:53:19 UTC, Chris M. wrote: > >> On Friday, 29 June 2018 at 20:08:49 UTC, Chris M. wrote: > >>> On Friday, 29 June 2018 at 19:53:27 UTC, b

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Chris M. via Digitalmars-d-learn
On Monday, 2 July 2018 at 17:33:20 UTC, Bauss wrote: On Monday, 2 July 2018 at 12:53:19 UTC, Chris M. wrote: On Friday, 29 June 2018 at 20:08:49 UTC, Chris M. wrote: On Friday, 29 June 2018 at 19:53:27 UTC, bauss wrote: On Friday, 29 June 2018 at 19:25:42 UTC, Chris M. wrote: [...] Are you

Re: Can I call GC.addRoot from constructor and trigger collection with destroy()?

2018-07-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/1/18 5:59 PM, Robert M. Münch wrote: I'm creating a bunch of objects and need to use these object pointers with C code. Hence I need to protect them from being GC with GC.addRoot. Can this call be made out of a constructor? So that I can protect the objects as earyl as possible? Yes.

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Bauss via Digitalmars-d-learn
On Monday, 2 July 2018 at 12:53:19 UTC, Chris M. wrote: On Friday, 29 June 2018 at 20:08:49 UTC, Chris M. wrote: On Friday, 29 June 2018 at 19:53:27 UTC, bauss wrote: On Friday, 29 June 2018 at 19:25:42 UTC, Chris M. wrote: [...] Are you compiling to 64bit? Else the functions will be named

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Chris M. via Digitalmars-d-learn
On Friday, 29 June 2018 at 20:08:49 UTC, Chris M. wrote: On Friday, 29 June 2018 at 19:53:27 UTC, bauss wrote: On Friday, 29 June 2018 at 19:25:42 UTC, Chris M. wrote: [...] Are you compiling to 64bit? Else the functions will be named GetClassLongA and SetClassLongA Yeah, that's what I'm

Re: Delegating constructor and call to super

2018-07-02 Thread Mike Parker via Digitalmars-d-learn
On Monday, 2 July 2018 at 09:42:36 UTC, Robert M. Münch wrote: I think it's because of "If a constructor's code contains a delegate constructor call, all possible execution paths through the constructor must make exactly one delegate constructor call" But, how am I supposed to call the supe

Delegating constructor and call to super

2018-07-02 Thread Robert M. Münch via Digitalmars-d-learn
class A { this(){...} this(int a) {...} this int a, int b){...} } class B { this(){... init some stuff for B ...} this(int a){super(a); this();} } Error: multiple constructor calls I think it's because of "If a constructor's code contains a delegate co

Re: 0xC0000005: 0x0000000000000000 access violation...

2018-07-02 Thread Simen Kjærås via Digitalmars-d-learn
On Sunday, 1 July 2018 at 22:04:05 UTC, Robert M. Münch wrote: On 2018-07-01 09:05:56 +, Robert M. Münch said: This one look nasty... And it was... the problem was, that I kept D allocated pointers in C code without informing the GC that the memory can't be collected nor moved. Bridging