August 20, 2005
Derek Parnell wrote:
> On Sat, 20 Aug 2005 08:45:08 +1000, Derek Parnell wrote:
> 
> 
>>>I noticed this too.  I'm not sure what's going on there either, but it looks like dmd/link automatically removes redundant symbols/objects from the final build.  The build tool doesn't seem to do that: it seems to include every import referenced/compiled. 
>>
>>One quick difference is that the run-dmd uses the -release and -O switches
>>but the run-build doesn't. That would have an effect of the .exe sizes.
> 
> 
> Just noticed another difference. The run-build uses the -debug switch but
> the run-dmd doesn't. That would mean the run-build includes debugging code
> into the exe but run-dmd removes that.
> 

I guess you're not using the lastest version of DWT because the compiling switches for both run-build.bat and run-dmd.bat are the same in DWT v0.3.
For example:
build controlexample.d -release -O -w -gui -clean -Tcontrolexample.exe

dmd -release -O -L/SUBSYSTEM:windows:5 swt.lib advapi32.lib comctl32.lib gdi32.lib shell32.lib comdlg32.lib ole32.lib user32_swt.lib imm32_swt.lib shell32_swt.lib msimg32_swt.lib usp10_swt.lib gdi32_swt.lib kernel32_swt.lib olepro32_swt.lib oleaut32_swt.lib oleacc_swt.lib alignabletab.d buttontab.d canvastab.d ccombotab.d clabeltab.d combotab.d controlexample.d coolbartab.d ctabfoldertab.d dialogtab.d grouptab.d labeltab.d listtab.d progressbartab.d rangetab.d sashformtab.d sashtab.d scrollabletab.d shelltab.d slidertab.d styledtexttab.d tab.d tabfoldertab.d tabletab.d tabletreetab.d texttab.d toolbartab.d treetab.d controlexample.res -ofcontrolexample.exe

Neither uses the -debug switch, but the former command produces a more bloated executable.
August 20, 2005
In article <de64m0$6u4$1@digitaldaemon.com>, zwang says...
>
>Derek Parnell wrote:
>> On Sat, 20 Aug 2005 08:45:08 +1000, Derek Parnell wrote:
>> 
>> 
>>>>I noticed this too.  I'm not sure what's going on there either, but it looks like dmd/link automatically removes redundant symbols/objects from the final build.  The build tool doesn't seem to do that: it seems to include every import referenced/compiled.
>>>
>>>One quick difference is that the run-dmd uses the -release and -O switches but the run-build doesn't. That would have an effect of the .exe sizes.
>> 
>> 
>> Just noticed another difference. The run-build uses the -debug switch but the run-dmd doesn't. That would mean the run-build includes debugging code into the exe but run-dmd removes that.
>> 
>
>I guess you're not using the lastest version of DWT because the compiling
>switches for both run-build.bat and run-dmd.bat are the same in DWT v0.3.
>For example:
>build controlexample.d -release -O -w -gui -clean -Tcontrolexample.exe
>
>dmd -release -O -L/SUBSYSTEM:windows:5 swt.lib advapi32.lib comctl32.lib gdi32.lib shell32.lib comdlg32.lib ole32.lib user32_swt.lib imm32_swt.lib shell32_swt.lib msimg32_swt.lib usp10_swt.lib gdi32_swt.lib kernel32_swt.lib olepro32_swt.lib oleaut32_swt.lib oleacc_swt.lib alignabletab.d buttontab.d canvastab.d ccombotab.d clabeltab.d combotab.d controlexample.d coolbartab.d ctabfoldertab.d dialogtab.d grouptab.d labeltab.d listtab.d progressbartab.d rangetab.d sashformtab.d sashtab.d scrollabletab.d shelltab.d slidertab.d styledtexttab.d tab.d tabfoldertab.d tabletab.d tabletreetab.d texttab.d toolbartab.d treetab.d controlexample.res -ofcontrolexample.exe
>
>Neither uses the -debug switch, but the former command produces a more bloated executable.

I tried the controlexample and dummyeclipse with combinations of -O, -release, -inline and -debug alone, building with both 'build' and 'dmd', and they ran fine (WinXP SP2, dmd v0.129, build v2.9(1197)).


August 20, 2005
On Sat, 20 Aug 2005 10:29:17 +0800, zwang wrote:

> Derek Parnell wrote:
>> On Sat, 20 Aug 2005 08:45:08 +1000, Derek Parnell wrote:
>> 
>> 
>>>>I noticed this too.  I'm not sure what's going on there either, but it looks like dmd/link automatically removes redundant symbols/objects from the final build.  The build tool doesn't seem to do that: it seems to include every import referenced/compiled.
>>>
>>>One quick difference is that the run-dmd uses the -release and -O switches but the run-build doesn't. That would have an effect of the .exe sizes.
>> 
>> 
>> Just noticed another difference. The run-build uses the -debug switch but the run-dmd doesn't. That would mean the run-build includes debugging code into the exe but run-dmd removes that.
>> 
> 
> I guess you're not using the lastest version of DWT because the compiling switches for both run-build.bat and run-dmd.bat are the same in DWT v0.3.

No, I was looking at the latest DWT version, but I saw it wrong. There is no -debug in the run-build.bat file; my mistake.

However, there should be "-Xswt" in the Build script so that build doesn't try to recompile and link the library source files again.

-- 
Derek Parnell
Melbourne, Australia
20/08/2005 3:05:42 PM
August 20, 2005
Dave wrote:
> In article <de64m0$6u4$1@digitaldaemon.com>, zwang says...
> 
>>Derek Parnell wrote:
>>
>>>On Sat, 20 Aug 2005 08:45:08 +1000, Derek Parnell wrote:
>>>
>>>
>>>
>>>>>I noticed this too.  I'm not sure what's going on there either, but it looks like dmd/link automatically removes redundant symbols/objects from the final build.  The build tool doesn't seem to do that: it seems to include every import referenced/compiled. 
>>>>
>>>>One quick difference is that the run-dmd uses the -release and -O switches
>>>>but the run-build doesn't. That would have an effect of the .exe sizes.
>>>
>>>
>>>Just noticed another difference. The run-build uses the -debug switch but
>>>the run-dmd doesn't. That would mean the run-build includes debugging code
>>>into the exe but run-dmd removes that.
>>>
>>
>>I guess you're not using the lastest version of DWT because the compiling switches for both run-build.bat and run-dmd.bat are the same in DWT v0.3.
>>For example:
>>build controlexample.d -release -O -w -gui -clean -Tcontrolexample.exe
>>
>>dmd -release -O -L/SUBSYSTEM:windows:5 swt.lib advapi32.lib comctl32.lib gdi32.lib shell32.lib comdlg32.lib ole32.lib user32_swt.lib imm32_swt.lib shell32_swt.lib msimg32_swt.lib usp10_swt.lib gdi32_swt.lib kernel32_swt.lib olepro32_swt.lib oleaut32_swt.lib oleacc_swt.lib alignabletab.d buttontab.d canvastab.d ccombotab.d clabeltab.d combotab.d controlexample.d coolbartab.d ctabfoldertab.d dialogtab.d grouptab.d labeltab.d listtab.d progressbartab.d rangetab.d sashformtab.d sashtab.d scrollabletab.d shelltab.d slidertab.d styledtexttab.d tab.d tabfoldertab.d tabletab.d tabletreetab.d texttab.d toolbartab.d treetab.d controlexample.res -ofcontrolexample.exe
>>
>>Neither uses the -debug switch, but the former command produces a more bloated executable.
> 
> 
> I tried the controlexample and dummyeclipse with combinations of -O, -release,
> -inline and -debug alone, building with both 'build' and 'dmd', and they ran
> fine (WinXP SP2, dmd v0.129, build v2.9(1197)).
> 
> 

Yes, but I was talking about the huge difference between .exe file sizes and compiling time.
August 20, 2005
Derek Parnell wrote:
> On Sat, 20 Aug 2005 10:29:17 +0800, zwang wrote:
> 
> 
>>Derek Parnell wrote:
>>
>>>On Sat, 20 Aug 2005 08:45:08 +1000, Derek Parnell wrote:
>>>
>>>
>>>
>>>>>I noticed this too.  I'm not sure what's going on there either, but it looks like dmd/link automatically removes redundant symbols/objects from the final build.  The build tool doesn't seem to do that: it seems to include every import referenced/compiled. 
>>>>
>>>>One quick difference is that the run-dmd uses the -release and -O switches
>>>>but the run-build doesn't. That would have an effect of the .exe sizes.
>>>
>>>
>>>Just noticed another difference. The run-build uses the -debug switch but
>>>the run-dmd doesn't. That would mean the run-build includes debugging code
>>>into the exe but run-dmd removes that.
>>>
>>
>>I guess you're not using the lastest version of DWT because the compiling switches for both run-build.bat and run-dmd.bat are the same in DWT v0.3.
> 
> 
> No, I was looking at the latest DWT version, but I saw it wrong. There is
> no -debug in the run-build.bat file; my mistake. 
> 
> However, there should be "-Xswt" in the Build script so that build doesn't
> try to recompile and link the library source files again.
> 


The "-Xswt" switch works fine with the "controlexample", though the executable is still slightly bigger.
But "build dummyeclipse.d -w -gui -release -O -clean -Tdummyeclipse.exe -Xswt" fails to compile at all.
August 20, 2005
zwang wrote:
> Derek Parnell wrote:
>> No, I was looking at the latest DWT version, but I saw it wrong. There is
>> no -debug in the run-build.bat file; my mistake.
>> However, there should be "-Xswt" in the Build script so that build doesn't
>> try to recompile and link the library source files again.
>>
> 
> 
> The "-Xswt" switch works fine with the "controlexample", though the executable is still slightly bigger.
> But "build dummyeclipse.d -w -gui -release -O -clean -Tdummyeclipse.exe -Xswt" fails to compile at all.

Well, it compiles but with an enormous list of linker errors.
August 20, 2005
On Sat, 20 Aug 2005 13:55:43 +0800, zwang wrote:

> zwang wrote:
>> Derek Parnell wrote:
>>> No, I was looking at the latest DWT version, but I saw it wrong. There is
>>> no -debug in the run-build.bat file; my mistake.
>>> However, there should be "-Xswt" in the Build script so that build
>>> doesn't
>>> try to recompile and link the library source files again.
>>>
>> 
>> 
>> The "-Xswt" switch works fine with the "controlexample", though the
>> executable is still slightly bigger.
>> But "build dummyeclipse.d -w -gui -release -O -clean -Tdummyeclipse.exe
>> -Xswt" fails to compile at all.
> 
> Well, it compiles but with an enormous list of linker errors.

That is because you specified the libraries to link in the run-dmd file but didn't in the run-build file. In the controlexamples source file you had specified all the pragmas for build but you didn't in the dummyecplise source file.

-- 
Derek Parnell
Melbourne, Australia
20/08/2005 5:04:16 PM
August 20, 2005
zwang wrote:

>> Did you try running the dummeclipse.exe after building it with run-build.bat?  Mine wouldn't run.
>>
>> -JJR
> 
> 
> Yes, I did. The .exe runs normally.
> BTW, I'm using the latest version of DWT and dmd on WinXP.

I must have done something weird, then.
August 20, 2005
In article <de6fvh$etb$1@digitaldaemon.com>, zwang says...
>
>Dave wrote:
>> In article <de64m0$6u4$1@digitaldaemon.com>, zwang says...
>> 
>> I tried the controlexample and dummyeclipse with combinations of -O, -release, -inline and -debug alone, building with both 'build' and 'dmd', and they ran fine (WinXP SP2, dmd v0.129, build v2.9(1197)).
>> 
>
>Yes, but I was talking about the huge difference between .exe file sizes and compiling time.

I followed up to the wrong post (yours), and not:

http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.announce/1241

What looked to be the worst issue was that the 'build' executable wouldn't run, so I was trying to provide a little feedback on that..


August 22, 2005
I have noticed this before.
"run-build.bat" compiles all the source files include SWT source and links these
objs to a .exe without "swt.lib". This leads to a big size.
"run-dmd.bat" will compile only the example source files and link to "swt.lib".
(You must build swt.lib before "run-dmd.bat").

Use build to link with "swt.lib" you should exclude the SWT source by "-Xswt"
and specify the "swt.lib". like
"build dummyeclipse.d -w -gui -release -O -clean -Tdummyeclipse.exe -Xswt
swt.lib"
In this way, the exe size is small enough but still a little bigger than the one
"run-dmd.bat" generated. This looks some strange since build just invoke
"link.exe" like dmd does in my thought.


1 2 3
Next ›   Last »