Re: C++ interface problem

2015-04-30 Thread Benjamin Thaut via Digitalmars-d-learn
On Wednesday, 29 April 2015 at 19:04:11 UTC, extrawurst wrote: On Wednesday, 29 April 2015 at 13:55:46 UTC, Benjamin Thaut wrote: On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote: here is the shortened version of the returned class CSteamID:

Re: C++ interface problem

2015-04-30 Thread extrawurst via Digitalmars-d-learn
On Thursday, 30 April 2015 at 08:18:16 UTC, Benjamin Thaut wrote: On Wednesday, 29 April 2015 at 19:04:11 UTC, extrawurst wrote: On Wednesday, 29 April 2015 at 13:55:46 UTC, Benjamin Thaut wrote: On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote: here is the shortened version of the

Re: C++ interface problem

2015-04-29 Thread extrawurst via Digitalmars-d-learn
On Wednesday, 29 April 2015 at 13:55:46 UTC, Benjamin Thaut wrote: On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote: here is the shortened version of the returned class CSteamID: https://gist.github.com/Extrawurst/936f56ceaa87cf287257 this is the shortened interface (no destructors

Re: C++ interface problem

2015-04-29 Thread Benjamin Thaut via Digitalmars-d-learn
On Monday, 27 April 2015 at 21:19:02 UTC, extrawurst wrote: here is the shortened version of the returned class CSteamID: https://gist.github.com/Extrawurst/936f56ceaa87cf287257 this is the shortened interface (no destructors in the rest of the code either):

Re: C++ interface problem

2015-04-27 Thread extrawurst via Digitalmars-d-learn
On Monday, 27 April 2015 at 07:37:23 UTC, Laeeth Isharc wrote: On Sunday, 26 April 2015 at 15:49:46 UTC, extrawurst wrote: I hope someone can tell me where my bug is. I am linking to a dynamic library with C++ interfaces: ``` //alias S = ulong; struct S { ulong data; } extern(C) I getI();

Re: C++ interface problem

2015-04-27 Thread extrawurst via Digitalmars-d-learn
On Monday, 27 April 2015 at 16:24:16 UTC, Benjamin Thaut wrote: Am 27.04.2015 um 17:16 schrieb extrawurst: On Monday, 27 April 2015 at 13:14:21 UTC, Benjamin Thaut wrote: On Monday, 27 April 2015 at 13:08:33 UTC, extrawurst wrote: Don't ask me about the compiler, like stated above I have no

Re: C++ interface problem

2015-04-27 Thread Laeeth Isharc via Digitalmars-d-learn
On Sunday, 26 April 2015 at 15:49:46 UTC, extrawurst wrote: I hope someone can tell me where my bug is. I am linking to a dynamic library with C++ interfaces: ``` //alias S = ulong; struct S { ulong data; } extern(C) I getI(); extern(C++) interface I { void foo(); S bar(); } ``` now

Re: C++ interface problem

2015-04-27 Thread Benjamin Thaut via Digitalmars-d-learn
On Monday, 27 April 2015 at 13:08:33 UTC, extrawurst wrote: Don't ask me about the compiler, like stated above I have no control over the binaries, it is proprietary. Thats bad to start with. the C++ class basically is: ``` class S { union SteamID_t { struct

Re: C++ interface problem

2015-04-27 Thread Benjamin Thaut via Digitalmars-d-learn
On Monday, 27 April 2015 at 11:00:23 UTC, extrawurst wrote: Thought about that too and tried uint aswell. does not work either.. Please post the c++ declarations as well. Which c++ compiler do you use for win32? (dmc or msvc) Kind Regards Benjamin

Re: C++ interface problem

2015-04-27 Thread extrawurst via Digitalmars-d-learn
On Monday, 27 April 2015 at 12:56:57 UTC, Benjamin Thaut wrote: On Monday, 27 April 2015 at 11:00:23 UTC, extrawurst wrote: Thought about that too and tried uint aswell. does not work either.. Please post the c++ declarations as well. Which c++ compiler do you use for win32? (dmc or msvc)

Re: C++ interface problem

2015-04-27 Thread extrawurst via Digitalmars-d-learn
On Monday, 27 April 2015 at 13:14:21 UTC, Benjamin Thaut wrote: On Monday, 27 April 2015 at 13:08:33 UTC, extrawurst wrote: Don't ask me about the compiler, like stated above I have no control over the binaries, it is proprietary. Thats bad to start with. the C++ class basically is: ```

Re: C++ interface problem

2015-04-27 Thread Benjamin Thaut via Digitalmars-d-learn
Am 27.04.2015 um 17:16 schrieb extrawurst: On Monday, 27 April 2015 at 13:14:21 UTC, Benjamin Thaut wrote: On Monday, 27 April 2015 at 13:08:33 UTC, extrawurst wrote: Don't ask me about the compiler, like stated above I have no control over the binaries, it is proprietary. Thats bad to

C++ interface problem

2015-04-26 Thread extrawurst via Digitalmars-d-learn
I hope someone can tell me where my bug is. I am linking to a dynamic library with C++ interfaces: ``` //alias S = ulong; struct S { ulong data; } extern(C) I getI(); extern(C++) interface I { void foo(); S bar(); } ``` now the question is why does it crash to access bar() in both