How to make D resolve C++ symbols by mangling symbols with the Itanium ABI on Windows

Johan j at j.nl
Mon Feb 26 20:05:40 UTC 2024


On Monday, 26 February 2024 at 13:36:42 UTC, thumbgun wrote:
> I'm currently trying to call some C++ functions that were 
> compiled by g++ (mingw). However g++ uses the Itanium ABI name 
> mangling rules. dmd on Windows tries to link functions based on 
> the MSVC name mangling rules.
...
> Is there any way I can make dmd link to symbols mangled 
> according to the Itanium ABI's rules on Windows?

Rather than the mangling names of functions, I'd be more worried 
about calling conventions (something that mismatched name 
mangling is supposed to help you with! ;-)).

You can try with LDC and `-mtriple=x86_64-windows-gnu`.

-Johan



More information about the Digitalmars-d mailing list