Re: C++/D class interop example crashes

2021-03-27 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 27 March 2021 at 21:50:19 UTC, Jan wrote: On Saturday, 27 March 2021 at 18:39:53 UTC, Bastiaan Veelo wrote: The example links objects statically. You may be experiencing additional challenges with crossing DLL boundaries. I have not yet used DLLs, but did you initialise the D

Re: C++/D class interop example crashes

2021-03-27 Thread Jan via Digitalmars-d-learn
On Saturday, 27 March 2021 at 18:39:53 UTC, Bastiaan Veelo wrote: The example links objects statically. You may be experiencing additional challenges with crossing DLL boundaries. I have not yet used DLLs, but did you initialise the D runtime? I haven't done anything extra (I'm pretty new to

Re: C++/D class interop example crashes

2021-03-27 Thread bachmeier via Digitalmars-d-learn
On Saturday, 27 March 2021 at 18:39:53 UTC, Bastiaan Veelo wrote: The example links objects statically. You may be experiencing additional challenges with crossing DLL boundaries. I have not yet used DLLs, but did you initialise the D runtime? — Bastiaan. This is an example taken from the

Re: C++/D class interop example crashes

2021-03-27 Thread Bastiaan Veelo via Digitalmars-d-learn
On Saturday, 27 March 2021 at 15:09:20 UTC, Jan wrote: I just tried to get this example to work: https://dlang.org/spec/cpp_interface.html#using_d_classes_from_cpp It kept crashing for me with a 'privileged instruction' error when the function 'bar' was executed. Finally I removed the call to