Lib change leads to larger executables

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Thu Feb 22 13:14:32 PST 2007


Sean Kelly wrote:
> Still, I don't entirely understand why this appears to not be an issue 
> using Build, which has historically had bloat issues in some cases.  Was 
> it just luck, or do things actually change when objects are stored in a 
> library as opposed to not?

Doesn't Build only link together the object files for modules that are 
imported at any point in the application?
This problem is that the locale.Core module isn't used by the program 
and is still linked in.
But AFAIK Build wouldn't add Core.obj to the link command line if the 
module isn't imported from any module it compiled.
The linker can't pick the wrong object file to link in if it only 
considers "right" ones...

So the problem here is pretty related to library usage, in particular to 
the fact that libraries can contain object files that aren't needed for 
a particular program.



More information about the Digitalmars-d mailing list