Re: Shared static constructors from C# EXE

2016-02-26 Thread Thalamus via Digitalmars-d-learn
On Friday, 26 February 2016 at 08:37:35 UTC, Benjamin Thaut wrote: On Thursday, 25 February 2016 at 17:46:18 UTC, Thalamus wrote: On Thursday, 25 February 2016 at 16:05:37 UTC, Benjamin Thaut wrote: [...] Thanks Benjamin. When I went to whittle this down to its barest essentials, though, the

Re: Shared static constructors from C# EXE

2016-02-26 Thread Benjamin Thaut via Digitalmars-d-learn
On Thursday, 25 February 2016 at 17:46:18 UTC, Thalamus wrote: On Thursday, 25 February 2016 at 16:05:37 UTC, Benjamin Thaut wrote: [...] Thanks Benjamin. When I went to whittle this down to its barest essentials, though, the repro is pretty simple. It involves LIBs, but not Dlls, and it doe

Re: Shared static constructors from C# EXE

2016-02-25 Thread Thalamus via Digitalmars-d-learn
On Thursday, 25 February 2016 at 16:05:37 UTC, Benjamin Thaut wrote: On Thursday, 25 February 2016 at 14:42:14 UTC, Thalamus wrote: your entry point. Hi Guillaume, Thanks for responding so quickly! I had found that wiki page before and I'd been following the "DLLs with a C Interface" sectio

Re: Shared static constructors from C# EXE

2016-02-25 Thread Benjamin Thaut via Digitalmars-d-learn
On Thursday, 25 February 2016 at 14:42:14 UTC, Thalamus wrote: your entry point. Hi Guillaume, Thanks for responding so quickly! I had found that wiki page before and I'd been following the "DLLs with a C Interface" section closely. I had forgotten to add -shared when building the DLL, but

Re: Shared static constructors from C# EXE

2016-02-25 Thread Thalamus via Digitalmars-d-learn
On Thursday, 25 February 2016 at 14:07:21 UTC, Guillaume Piolat wrote: On Thursday, 25 February 2016 at 14:01:30 UTC, Thalamus wrote: I don't control the EXE itself and the code I write to interface with it must be either C# or JavaScript, but this repros with a test C# driver EXE as well. The

Re: Shared static constructors from C# EXE

2016-02-25 Thread Guillaume Piolat via Digitalmars-d-learn
On Thursday, 25 February 2016 at 14:01:30 UTC, Thalamus wrote: I don't control the EXE itself and the code I write to interface with it must be either C# or JavaScript, but this repros with a test C# driver EXE as well. The interfacing C# code can only be aware of the exposed D DLL functions de

Shared static constructors from C# EXE

2016-02-25 Thread Thalamus via Digitalmars-d-learn
Hi everyone, I looked in the forums and Google in general but I didn't find a similar question, and I'm stumped. I have a scenario where a set of classes must be registered with a class mapper and then instantiated via a factory. The classes themselves are agnostic of one another, and all int