Link error (issue 23209)

Bastiaan Veelo Bastiaan at Veelo.net
Mon Jan 8 10:39:25 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=23209

This valid code:
```d
void main()
{
     import std.net.curl, std.stdio;

     auto http = HTTP();
     http.setAuthentication("", "");
     writeln(1.0);
}
```

gives you this link error:
`druntime/import/core/internal/switch_.d:189: error: undefined 
reference to 
'_D4core9exception__T15__switch_errorTZQsFNaNbNiNeAyamZv'`

Demangled, the missing symbol is
```d
pure nothrow @nogc @trusted void 
core.exception.__switch_errorT!().__switch_errorT(immutable(char)[], ulong)
```

So it seems to me that a template fails to instantiate. Can I 
force an explicit instantiation to work around this? How?

Thanks,
--Bastiaan.


More information about the Digitalmars-d mailing list