www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Mixin mangled name

reply Andrey <saasecondbox yandex.ru> writes:
Hello,
Is it possible to mixin in code a mangled name of some entity so 
that compiler didn't emit undefined symbol error? For example 
mangled function name or template parameter?
Jul 01 2019
next sibling parent Adam D. Ruppe <destructionator gmail.com> writes:
On Monday, 1 July 2019 at 19:40:09 UTC, Andrey wrote:
 Is it possible to mixin in code a mangled name of some entity 
 so that compiler didn't emit undefined symbol error? For 
 example mangled function name or template parameter?
try pragma(mangle, "thing here") void foo() {}
Jul 01 2019
prev sibling parent Jonathan Marler <johnnymarler gmail.com> writes:
On Monday, 1 July 2019 at 19:40:09 UTC, Andrey wrote:
 Hello,
 Is it possible to mixin in code a mangled name of some entity 
 so that compiler didn't emit undefined symbol error? For 
 example mangled function name or template parameter?
If you've got undefined symbol "foo", you could just add this to one of your modules: extern (C) void foo() { }
Jul 01 2019