rtInfo issue

Walter Bright newshound2 at digitalmars.com
Sun Dec 9 12:22:23 PST 2012


On 12/9/2012 11:36 AM, Benjamin Thaut wrote:
> If a POD struct (which does not contain any reference types, pointers, arrays
> etc) is placed in a library. And that library is then linked against a
> executable, the rtInfo of the POD struct will be lost. It will be generated by
> the compiler when compiling the library, but for some reason it is gone after
> the final binary is compiled and linked. But as soon as I add a void* pointer to
> that struct everythings works fine.
>
> Any idea what could be happening there and how to fix it? If the linker stripts
> the rtInfo out, why does adding a void* make a difference?


Template instances are written to COMDAT sections, which are stripped out if 
they are not referenced.



More information about the Digitalmars-d mailing list