Why extern variables and functions within template/struct/class have a D mangling
Igor Stepanov
wazar.leollone at yahoo.com
Tue May 7 14:06:48 PDT 2013
Is it correct?
When I wrote next code:
template Extern(string s)
{
mixin("static extern(C) extern int "~s~";"~
"alias Extern = "~s~";");
}
void main()
{
writeln(&Extern!("xxx"));
}
I get error message "undefined reference to
`_D1a24__T6ExternVAyaa3_787878Z3xxxi'", when I expect to get
"undefined reference to `xxx'"?
Is it error?
More information about the Digitalmars-d
mailing list