To BIG!!

Started by
12 comments, last by sevak 20 years, 7 months ago
It is easily possible to get small EXEs with Dev-C++, you just need to know how. Make sure you have Best Optimisation turned on, and Generate Debugging Information turned off. Then, add -s to the linker command-line paramaters. If that doesn''t give you small enough, get UPX and compress the executable. My tetris clone becomes <50k when using the above techniques.
Advertisement
One possible size optimization is to write the module prologue yourself, and not link to the c++ runtime libraries at all.
However, this is relatively difficult compared to other suggestions here.

[edited by - Nik02 on September 2, 2003 10:21:33 AM]

Niko Suni

quote:Original post by AikonIV
It is easily possible to get small EXEs with Dev-C++, you just need to know how. Make sure you have Best Optimisation turned on, and Generate Debugging Information turned off. Then, add -s to the linker command-line paramaters. If that doesn''t give you small enough, get UPX and compress the executable. My tetris clone becomes <50k when using the above techniques.


what does the -s option do? I''m looking to do the samething for my programs too but I''m using Borland''s compiler and I was wondering if there''s a similar option under that? I already have debug info turned off and have optimisation set to create smallest possible exe. But the resulting exe file is still well over 100k for a simple console program.




--{You fight like a dairy farmer!}

--{You fight like a dairy farmer!}

UPX =)

.lick

This topic is closed to new replies.

Advertisement