How can we call a func template instance using the Mars vendor already ?

monkyyy crazymonkyyy at gmail.com
Thu Feb 19 18:15:41 UTC 2026


On Thursday, 19 February 2026 at 18:08:24 UTC, user1234 wrote:
> 
>> Error: function `onlineapp.OK` label 
>> `_D9onlineapp__T2okHVii1ZQjFNaNbNiNfZi` is undefined

mangles suck and need to be updated for tiny details

```
module onlineapp;

int ok(int i)(){return i;}

enum mangle=ok!1.mangleof;
mixin("extern(C) int "~mangle~"();");

void OK()
{
     mixin("asm{call "~mangle~";}");
}

int main()
{
     OK();
     return 0;
}
```


More information about the Digitalmars-d-learn mailing list