a mysterious linking error introduced by import a library

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Sat Oct 14 18:15:11 UTC 2023


The frontend will attempt to not emit all template instantiations if it 
thinks that the instantiation isn't used. However it sometimes get this 
wrong, so you have to override it and tell it to emit them all anyway 
and let the linker do the eliding instead.

This is a known problem of all the compilers since its done by the 
shared frontend, rather than the glue layer.

It is a bug, but given how complex and time consuming it can be to 
minimize it to a small reproducible example, its not always worth the 
time to try and report it.


More information about the D.gnu mailing list