std libraries vs. personal libraries

John Reimer terminal.node at gmail.com
Thu Mar 16 17:20:48 PST 2006


Yes, I believe jicman wrote:
> Ok, so I tried dmd and it builds both files ok and with the same file size
> (below):
> 
> 16:05:42.78>dmd -I.. test.d
> c:\dmd\bin\..\..\dm\bin\link.exe test,,,user32+kernel32/noi;
> 
> 16:06:02.14>dmd -I.. test0.d
> c:\dmd\bin\..\..\dm\bin\link.exe test0,,,user32+kernel32/noi;
> 
> 03/16/2006  04:28 PM            86,556 test.exe
> 03/16/2006  04:28 PM            86,556 test0.exe
> 
> So, apparently, is build.
> 
> Derek? :-)
> 
> 

I believe that by default 'build' compiles and links in files that may 
be "import-only", so pretty much anything that might be referenced in 
the imports will be included in the final executable.  That means you 
may get files in there that merely declare a bunch of symbols: like the 
ones that use extern(C) or extern(Windows) for external libraries -- you 
don't need the object form of those modules since they just contain 
symbol definitions for the external libraries.  Compiling all those 
symbols and putting the object into your project is going to bloat up 
the executable, I imagine.

If you know which files are really just import header modules, maybe try 
using builds exclude function on the command line: -X(module or package).

Did you try -Xphobos?

That might help.

-JJR



More information about the Digitalmars-d-learn mailing list