std libraries vs. personal libraries

jicman jicman_member at pathlink.com
Thu Mar 16 13:06:07 PST 2006


I have these two programs:
// test.d
private import std.string;
private import std.stdio;
private import std.date;
private import std.file;
private import std.recls;
private import jic.lib.misc;

int main(char[][] args) { return(0); }

and

// test0.d
private import std.string;
private import std.stdio;
private import std.date;
private import std.file;
private import std.recls;

int main(char[][] args) { return(0); }


When I compile test.d, I get:

15:20:05.13>build -I.. test.d
c:\dmd\bin\..\..\dm\bin\link.exe
C:\cygwin\home\us319318\source\d\jic\lib\misc_bn+C:\cygwin\home\us319318\source\d\jic\lib\misc+RemFiles_bn+test,test.exe,,user32+kernel32,test.def/noi;

and the size of the test.exe file is 162,844 bytes.  However, when I compile
test0.d, I get:

15:24:03.45>build -I.. test0.d
c:\dmd\bin\..\..\dm\bin\link.exe test0,test0.exe,,user32+kernel32,test0.def/noi;

and the size of the test0.exe file is 86,556 bytes.

Now, I see that my personal library is getting added also, but I am not adding
anything to the program.  Why is the personal library getting added by the
compiler when I am not calling any functions from it?

Could it be build?





More information about the Digitalmars-d-learn mailing list