Original Post
Is it normal that using fstream and select windows (lean and mean) function calls push the executable size up to the 130 kB region with size optimizations enabled? I have a few other classes of my own that take up roughly 8 kB (empirical tests showed that), but using an ifstream instance magically adds some 60-80 kB to the program size, even though I'm only using tellg(), seekg() and read(). This seems insane given that the program could be fit into ~5 kB without directly mapping all that unneccessary junk directly into the exe at link time. I'm using VC8, all optimizations geared towards favoring small code size. What's worse, UPX can't directly compress the executable for some reason, so I have to --force it, after which the file is half as large (~62 kB, still way too large), but just plain won't run: "The application failed to initialize properly (0xc0000005)" (displayed twice) The grand flop of all times, to me, is this: links to 44 kB (again, with size optimizations enabled). Is that normal? I mean, I'd expect some 0.2 - 0.6 kB bytes at most... And yes, before anyone asks - I'm talking about release mode. PS - in this instance I'm talking about a Windows console application.
void main(){}