Using C++ Classes From D: dmd cannot link, while ldc segfault

mw mingwu at gmail.com
Mon Jun 19 05:39:51 UTC 2023


On Monday, 19 June 2023 at 05:32:23 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> This is just a guess, but I think the problem is the vtable is 
> incomplete.
>
> Because of this the offsets are wrong. So you wouldn't be 
> calling push_back.

So, you mean on the D side, it need to list all the fields and 
methods of the C++ class?

```d
class std_list(T) {
   @disable this();
   void push_back(const ref T value);
}
```

Then it will be very tedious, esp. for such library class 
std::list.

Is there a tool that can automate this?

Thanks.



More information about the Digitalmars-d-learn mailing list