View previous topic :: View next topic |
Author |
Message |
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Mon Dec 26, 2005 4:54 pm Post subject: filesize |
|
|
Poseidon, which has (currently) more functionality (i.e. source) than my program is 460k and my program is 1.2mb. How this happens? Is build cleaning it? I haven't used build but I can not think of other explanation. |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Mon Dec 26, 2005 5:05 pm Post subject: |
|
|
If you don't compile your project using libraries, build does a wonderful job of pulling in just the objects needed from the different packages. As a result, it typically results in a much smaller executable than if you linked your project with the required libraries instead. I've noticed this in several situations, including when I've attempted to build DUI projects.
For some reason, the linker doesn't know how to make a minimal executable when it links in libraries. Thus, it is almost better to avoid the convenience of libraries altogether with D and stick to what the Build tool can do for you.
-JJR |
|
Back to top |
|
|
Shawn Liu
Joined: 09 Mar 2005 Posts: 104 Location: Shanghai, China
|
Posted: Mon Dec 26, 2005 7:54 pm Post subject: |
|
|
Since there are full of virtual functions inside SWT, the executable is very large indeed.
The binary of Poseidon is packed with Aspack.
http://www.aspack.com/
I tried to pack some DWT examples with UPX before, but failed. Maybe I introduced some wrong switches. If somebody is interested in, have a try to pack it with upx.
http://www.upx.org/ |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Mon Dec 26, 2005 8:08 pm Post subject: |
|
|
Hah!
My mistake. I guessed wrong!
-JJR |
|
Back to top |
|
|
zwang
Joined: 14 Sep 2005 Posts: 5 Location: Singapore
|
Posted: Tue Dec 27, 2005 6:23 am Post subject: |
|
|
Shawn Liu wrote: | I tried to pack some DWT examples with UPX before, but failed. Maybe I introduced some wrong switches. If somebody is interested in, have a try to pack it with upx.
http://www.upx.org/ |
Try upx -f |
|
Back to top |
|
|
|