I've been doing a bit of C stuff, and I can't seem to find out how to decrease the file size of executables more (while keeping the program in C). A simple
int main() { }
is a whopping 15,215 bytes compiled.
I'm using g++ with the -Os flag, that's all.
Any ideas how to shave off file size?
Name:
Anonymous2007-02-13 22:32
*C++, obviously
Name:
Anonymous2007-02-13 23:20
To reduce file size, use --strip-all or -s on your release builds. Also, iostream includes a lot of other stuff. It's huge.
Name:
Anonymous2007-02-13 23:28
Also what's your operating system?
For example i can write a very simple irc client (console ofcourse), and it's ~20KBs, a simple main() { } would be 7-8KBs.
Name:
Anonymous2007-02-14 0:19
gcc -Os file.c -o file
strip file
upx -9 file
...tada...
Name:
Anonymous2009-01-14 13:30
NO U
Name:
Anonymous2009-03-06 12:06
Iostream using namespace std void print int w int x 1 UnboundLocalError local!
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy