std libraries vs. personal libraries

jicman jicman_member at pathlink.com
Thu Mar 16 13:31:44 PST 2006


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? :-)


jicman says...
>
>
>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