How to make D resolve C++ symbols by mangling symbols with the Itanium ABI on Windows
thumbgun
thumbgun07 at gmail.com
Fri Mar 1 11:02:14 UTC 2024
>On Thursday, 29 February 2024 at 19:54:24 UTC, Carl Sturtivant
>wrote:
>
>Of course what we really need to know is the extent to which
>cross calling actually works >for various C++ constructs. I'd be
>grateful if anyone finds this out that they'd post it >here. I'm
>not a C++ fan, so I'm not the person to do this.
Your solution works for the difference in name mangling but
another problem is that on Windows DMD attempts to follow the
MSVC ABI which is different from the Itanium ABI. So when calling
a function compiled by g++ (mingw), it might not work.
The library I need to compile is Skia and after I looked a bit
more into the docs earlier, it turns out that the library is much
faster when compiled with clang. I looked into clang's
compatibility with the MSVC ABI and it pretty has what I need
apart from the name mangling support which is not fully ready yet.
I'll compile Skia with clang and use your solution to fix the
name mangling issue so I can call the functions. Once again
thanks for your reply.
More information about the Digitalmars-d
mailing list