Dark Bit Factory & Gravity

PROGRAMMING => C / C++ /C# => Topic started by: va!n on January 09, 2015

Title: Visual Studio 2013 Community - Settings for small exe files
Post by: va!n on January 09, 2015
Can someone explain me, what kind of settings must be used to produce a small win32 executeable?
I changed some settings and getting a small exe file - as long as i dont use floats. About 60 kb
will be added to the executeable when using floats :-( How to use floats without adding 60 kb?

Is there any way to write all the compiler settings in the top of the C/C++ source, without changing
values in the settings window?

Would be nice to know the settings for a Visual Studio 2013 Community - Win32 Form App.

Title: Re: Visual Studio 2013 Community - Settings for small exe files
Post by: Hotshot on January 10, 2015
Hello Vain,

What files size are you aiming for? 30KB or 6KB?

Have you try UPX http://upx.sourceforge.net/#downloadupx  that will cut your files size in half?
Title: Re: Visual Studio 2013 Community - Settings for small exe files
Post by: va!n on January 11, 2015
@Hotshot:
I dont want shrink the exesize by packing the file. When using any float value in my source, the exe grows about 60 kb. So the question is, how to use floats without adding extra 60 kb to the created executeable?
Title: Re: Visual Studio 2013 Community - Settings for small exe files
Post by: hellfire on January 11, 2015
When using any float value in my source, the exe grows about 60 kb.
So you're probably linking the static runtime lib?
Title: Re: Visual Studio 2013 Community - Settings for small exe files
Post by: bitm0de on August 31, 2015
As this hasn't been posted yet: http://www.unknowncheats.me/wiki/C%2B%2B:Shrinking_C%2B%2B_Executables (http://www.unknowncheats.me/wiki/C%2B%2B:Shrinking_C%2B%2B_Executables)

Here's a good reference.
Title: Re: Visual Studio 2013 Community - Settings for small exe files
Post by: CLASSmate on September 12, 2015
It is very nice you want to expand your knowledge about IDE and compiler.
But maybe you should also explore other options.
Then those of Microsoft tech.
Title: Re: Visual Studio 2013 Community - Settings for small exe files
Post by: Canopy on February 06, 2016
funnily I created this post on pouet within a few weeks of this one being made.. maybe more hints there?

http://www.pouet.net/topic.php?which=10622