When you compile a program under Dev-C++, it automatically assumes you're going to debug it. Unlike MSVC, there is no way to switch between Release and Debug mode. When you compile, your program is going to be bloated with all of that debugging information. Strip, provided with Dev-C++, is used to "Remove symbols and sections from files". We are going to use it to remove the debugging information and reduce the size of your programs.
I find the best way to use Strip is if we have a user-defined tool for it. In order to do this, open your Dev-C++ and click Tools > Configure Tools. If you click the Add button you'll get the dialog shown below:
Give the tool a fitting title, I've called mine 'Strip Debug Info'. The next thing to do is input the location of Strip.exe by typing it in directly or browsing to it with the [...] button. I know mine is at C:\devcpp\bin\strip.exe, you will find yours in the bin\ directory wherever you installed Dev-C++ to. After that, add --strip-all "<EXENAME>" in the parameters, click OK and you're done. The quotes are needed because of the possibility of spaces in the path or program name. If you want to see all of the different parameters strip has to offer, run it in a dos box - without parameters - and it will display them. The finished tool should look like this:
To test it out, load up or create a project (C or C++, it doesn't matter), build it, and click Tools > Strip Debug Info (or whatever you named it). I'm using the "hello world" project we made in Dev-C++ Tutorial 1. When I compile the project, I get a program that is 448,713 bytes in size. When I use the new tool on it, it changes the size to 210,944 bytes. That's a little under half of the original size. I'd say this is a handy tool.
Quoted directly from http://upx.sourceforge.net/ - "UPX is a free, portable, extendable, high-performance executable packer for several different executable formats. It achieves an excellent compression ratio and offers very fast decompression. Your executables suffer no memory overhead or other drawbacks."
It really does the job too. Download the Win32 console version. I extracted the zip into C:\upx - keep track of where you put it until you're done making the tool for it. Once you've got it downloaded and in a safe place, we'll make a new tool. Open your Dev-C++ up, click Tools > Configure Tools, and click Add. Give it a fitting name, I'm using 'Compress with UPX' and type in the location of upx.exe (C:\upx\upx.exe for me) or browse to it. Finally, in the parameters textbox, enter --best "<EXENAME>". The --best switch is going to compress it as best it can, but it may take a bit of time. Look at UPX's documentation and decide what is right for you; I don't mind the wait because I'd rather have smaller program sizes because it takes up less space on this server. Here's what my tool looks like:
To finish off this tutorial, I'm going to use the UPX compression tool and show you new file sizes. After recompiling the "hello world" app to get all of the debug info back in, I use my Compress with UPX on it alone to go from 448,713 bytes to 311,497 bytes. Thats about 3/4 the original size. When I recompile, use my Strip tool and then the UPX tool, in that order, I go from 448,713 bytes to 73,728 bytes. That's quite a difference. It's important to Strip first and then Compress, because if you compressed first, you'd have to decompress before you could strip. You'll notice that the filesize won't change if you try to do it in the wrong order.
I hope these tools help you along, if you come up with other useful tools I'd be glad to post them here with your name plastered all over them ^_^