Function with C calling convention but D mangling
Benjamin Thaut
code at benjamin-thaut.de
Mon Dec 23 02:57:09 PST 2013
Doing lots of C interfacing lately I wonder if there is a way to create
a D function with C calling convention but D mangeling. I need this to
place C callbacks onto functions inside D templates. Putting extern(C)
before it does not work in this case. As extern(C) will also enforce C
mangling I get lots of duplicate symbol errors from the linker. I know
that I can work around this using mixin(string) but I wonder if there is
a other solution to the problem.
Kind Regards
Benjamin Thaut
More information about the Digitalmars-d-learn
mailing list