Solutions to the TypeInfo dependency injection issue?
Walter Bright
newshound at digitalmars.com
Thu Mar 8 11:20:40 PST 2007
Nathan Petrelli wrote:
> I'm referring to the issue raised by Tango developers about a TypeInfo for char[][]
> inflating the .EXE size by importing unneeded modules.
>
> The solution given by Walter to this issue was carefully/painfully examination
> of object file symbols to determine the correct order of linking.
>
> Are other solutions been planned or considered?
>
> Because I don't think this is a long term solution for big projects,
> specially if an IDE is been used (Most of them don't even let you
specify the
> compilation order of files).
>
> I think it would be possible to build a tool that analyzes object files and
> determines the optimal order in most cases, but this seems like a
hack on par
> with the moc compiler of the Qt project. A hack that's only needed to
supply
> a deficiency of the compiler.
This situation also only crops up when you're passing all the modules at
once to dmd, and then putting the resulting object files into a library.
Try compiling the modules independently when they are intended to be put
in a library.
More information about the Digitalmars-d
mailing list