Lib change leads to larger executables

Walter Bright newshound at digitalmars.com
Wed Feb 21 13:36:58 PST 2007


kris wrote:
> It also finds that particular one whether the module is listed first or 
> last in the lib response-file.

I bet that's because that module was imported (directly or indirectly) 
by every other module that used char[][], and so it was the only module 
that defines it.

> What is one supposed to do for production-quality libraries?

Some strategies:

1) minimize importing of modules that are never used

2) for modules with a lot of code in them, import them as a .di file 
rather than a .d

3) create a separate module that defines the relevant typeinfo's, and 
put that first in the library



More information about the Digitalmars-d mailing list