Advertisement

compiling small exe's

Started by October 18, 2000 06:16 PM
3 comments, last by Pierspo 24 years, 2 months ago
using djgpp + allegro basically my program which makes 1 pixel go up and down compiles to be 427 kb and i have a game (chicken2) made using the same compiler which has cool graphics an intro and sound is only 135 kb. My question how do i compile smaller exe''s?
yeah boy
(Assuming you aren''t already) Use the compiler switches -s and -O3. -s strips out all unnecessary info from the EXE, making it much smaller. -O3 turns on full optimisations, making it a bit smaller. You could also try an exectuable compressor. Other than that, there''s not much you can do.

==================
/* todo: insert cool sig */
Martee
Magnum Games.NET
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Advertisement
yeah that seems to work it cuts it down to 278 kb but im sure there must be more that can be done.
What''s taking up space is Allegro itself - Do both programs use Allegro? You probably shouldn''t worry too much about it.


"Whoever performs only his duty is not doing his duty." --Bahya ibn Pakuda
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away"--Henry David Thoreau
You can try UPX, a executable compressor (this means the exes file size decreases while it can still be executed as before on any computer)
UPX even beats rar compression!

wildsau.idv.uni-linz.ac.at/mfx

-Markus-
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.

This topic is closed to new replies.

Advertisement