extern(C) names are being mangled; that's crazy, Walter says I'm crazy

Ethan gooberman at gmail.com
Wed Jul 24 14:18:51 UTC 2019


On Wednesday, 24 July 2019 at 05:03:16 UTC, Manu wrote:
> https://issues.dlang.org/show_bug.cgi?id=20012
>
> I need to know who is the crazy one here?
> I can't believe the idea that extern(C) functions being mangled 
> to
> un-knowable generated names is what any sane user would ever 
> expect.
>
> Surely extern(C) means extern(C)?
>
> I'd like a poll here...

I've only glanced at the thread last night through red eyes.

But on Windows. Because most of my mangling experience is on 
Windows.

If you extern( C ) and it doesn't get mangled to exactly the 
__traits( identifier ) and nothing else then it's being done 
wrong.

You get duplicate symbols? Tough.

I had a similar problem at Remedy with trying to use named 
modules and Binderoo to invoke a commonly named extern( C++ ) 
function. And of course all those functions were mangled exactly 
the same because it's extern( C++ ) and there's no parent 
namespace. I mentioned this in my DConf 2018 talk. My solution is 
outside of the scope of this thread.


More information about the Digitalmars-d mailing list