Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i cant seem to reduce my exe size that was built with VS 2010, ive followed many guides and everytime my file is 51kb and all it does is MessageBoxA

I have followed this guide from start to finish

http://linkyzer0.com/papers/Decrease_Win...leSize.pdf

what am i doing wrong ?
Posted
Comments
enhzflep 1-Mar-15 3:18am    
The link doesn't work, it looks like it's been shortened by something - note the ellipsis in it.

51K isn't that big; and "all it does is MessageBoxA" isn't quite true - there is a lot going on "behind the scenes" in even a minimal Windows App.

Why would a 51K footprint be a problem these days? :laugh:

[edit]
Just a thought: if you really think it's "only one line" then you can reduce the amount of windows code that it's linked with:
1) Make sure you are on the Release version
2) Edit your project properties:
2.1) Configuration Properties...Linker...System
2.2) SubSystem: change to "Not Set".
2.3) save the changes with the "OK" button.

Rebuild (and if it compiles clean) check the file size.
[/edit]
 
Share this answer
 
v2
Comments
Kenneth Haugland 1-Mar-15 3:12am    
.NET framework is also behind the scene, and that's rather big the last time I checked. And you also need Windows or similar. So I don't see what the hassle should be with 51 kB :laugh:
enhzflep 1-Mar-15 3:35am    
[comment removed by author, since answer above has been changed]
enhzflep 1-Mar-15 4:19am    
:thumbs-up: +vote launched.
Andreas Gieriet 1-Mar-15 5:10am    
My 5!
Cheers
Andi
OriginalGriff 1-Mar-15 5:21am    
You're welcome!
One alternative idea: migrate to .NET platform where you can use C++/CLI and freely combine .NET managed code with native C++ code. As .NET assemblies link statically next to nothing, it minimizes the size of their modules. The difference in size if really impressively big.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900