* Win32 issues with Templates and Libs *

Sean Kelly sean at f4.ca
Tue Feb 20 13:46:18 PST 2007


Walter Bright wrote:
> Sean Kelly wrote:
>> 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?
> 
> What happens if you have two such modules in a library?

Oops... the name would have to be mangled to include the module name.  I 
suppose this still raises issues for some corner-cases, but it's all I 
can think of.


Sean



More information about the Digitalmars-d mailing list