* Win32 issues with Templates and Libs *
Sean Kelly
sean at f4.ca
Tue Feb 20 12:23:07 PST 2007
Walter Bright wrote:
> Sean Kelly wrote:
>
>> Who cares if the object files are bloated, if that's the only workable
>> option here?
>
> You'll care <g> once templates get complex enough. It's been a big
> problem with C++.
>
>> Or perhaps this suggests the need for a D linker that builds a catalog
>> of symbols inside libraries before linking instead of the behavior you
>> describe above?
>
> Building a linker or object file with non-standard semantics has its own
> set of problems.
Thanks for the reply. Your proposed solution finally reminded me that
we had this exact conversation a few years ago :-) It's a nasty hack,
but what if the compiler performed your proposed solution during
compilation:
> 1) have another global in module test that gets pulled in, thus also
> pulling the COMDAT along with it, and resolving the symbol.
In modules containing global template instances, generate a symbol,
let's say _Dforcelink, which is implicitly referenced in importing
modules. Is this possible?
Sean
More information about the Digitalmars-d
mailing list