On Saturday, 23 March 2019 at 13:04:10 UTC, kinke wrote:
On Saturday, 23 March 2019 at 11:35:45 UTC, Simon wrote:
Is there any way to end up with the correct mangled function signature, using only pointer types?

The problem is that the C++ compiler uses head-const for the array param (`float * const`), which cannot be represented in D.
What you can do is specify the mangle manually, e.g.:

pragma(mangle, "?ColorEdit4@ImGui@@YA_NPEBDQEAMH@Z")
extern(C++) bool ColorEdit4(const(char)* label, float* col, int flags = 0);

I didn't know specifying the mangle was possible, thanks!

Reply via email to