Author Topic: Visual Studio 2013 Community - Settings for small exe files  (Read 2361 times)

0 Members and 1 Guest are viewing this topic.

Offline va!n

  • Pentium
  • *****
  • Posts: 1398
  • Karma: 108
    • View Profile
    • http://www.secretly.de
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.

- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline Hotshot

  • DBF Aficionado
  • ******
  • Posts: 2114
  • Karma: 91
    • View Profile
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?

Offline va!n

  • Pentium
  • *****
  • Posts: 1398
  • Karma: 108
    • View Profile
    • http://www.secretly.de
@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?
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1289
  • Karma: 466
    • View Profile
    • my stuff
When using any float value in my source, the exe grows about 60 kb.
So you're probably linking the static runtime lib?
Challenge Trophies Won:

Offline bitm0de

  • ZX 81
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
As this hasn't been posted yet: http://www.unknowncheats.me/wiki/C%2B%2B:Shrinking_C%2B%2B_Executables

Here's a good reference.

Offline CLASSmate

  • ZX 81
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
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.

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
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