Take out all the run-time library link statements in Project Settings, write your own _mainCRTStartup function, and see just how small it goes. I'll have a pop and see how I do...
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You". -- Linus Torvalds
Originally posted by MSDN Journal ...on most hard drives the minimum space that a file takes up is 8KB or 16KB. Thus (as the logic goes), it's not worth trying to make your programs smaller than 8KB.
The linker excludes most things that aren't actually necessary, code-wise. However, the RTL startup code pulls in a lot of extra functions, bulking up the EXE.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You". -- Linus Torvalds
i am making a simple program, in release mode, and i am still getting a 162 kb exe! i took out all those extra libs like parksie said, and that didn't make any difference. i can't ignore default librarys, becuase i get errors.
My friend made the same program in C, and it was 44kb. Does anyone have any tips for making it smaller? perhaps a different compiler?
If you write in C then because there is less compiler-generated code (for handling virtual functions, static constructors, etc.) you can replace a large proportion of the startup code with something smaller.
You could always try compressing it (120K->50K) - search for UPX (I use that )
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You". -- Linus Torvalds
Thats the only line in there... not even a #include...
Do you know if you will answer no to this question?
If we've never seen something happen, we can't know if its impossible.
If the soles of a shoe make faces at the floor when we don't look and isn't being watched via mirror or video tape, will we ever know?
If someone orders you to disobey all of their orders, do you obey or disobey?