Optional name mangling
Stuart
stugol at gmx.com
Sun Jul 22 06:12:14 PDT 2012
On Sunday, 22 July 2012 at 07:01:50 UTC, Walter Bright wrote:
> This is a very old issue. To be compatible with the output of
> the Microsoft C compiler, the Windows calling convention is:
>
> _name at nn
>
> but somehow Microsoft left off the _ and @nn in the DLLs.
> Hence, part of the whole reason for the import libraries is
> then to provide a mapping of _name at nn => name.
>
> I have no idea who made this decision and why, but we're stuck
> with it.
Okay, but if you had a keyword - say, "extern(rawC)" - that did
no mangling whatsoever, then I could run implib without manually
editing every single damn line in every Microsoft .def file by
hand!!! Surely that's a good idea?
I don't know why implib is ignoring the /s switch, but it is. My
.lib file doesn't have underscores, and there doesn't seem to be
much I can do about it. Do I need a different version of implib
or something? Shouldn't the /s switch add underscores to
everything?
More information about the Digitalmars-d
mailing list