* Win32 issues with Templates and Libs *

Walter Bright newshound at digitalmars.com
Tue Feb 20 12:07:40 PST 2007


Lars Ivar Igesund wrote:
> Walter Bright wrote:
> 
>> kris wrote:
>>> Would you perhaps explain why ELF does not have this problem? Thanks
>> The ar format doesn't care if there are multiple definitions of the same
>> symbol. The linker just picks one (presumably the first one it finds)
>> and pulls in that module along with whatever else happens to be in that
>> module.
> 
> That's not entirely true. Symbols in ELF can be said to be either LOCAL,
> GLOBAL or WEAK. The local ones are per module, the global ones you can only
> have one of, whereas the weak ones you can have multiple of and one
> (probably the first, depending on linker etc) is chosen.

The template instances are put in the .o file as GLOBAL ones.



More information about the Digitalmars-d mailing list