To decrease executable size in FreePascal/Lazarus go to Project menu/Project Options and do the following in Compliation and Linking
Check the following (Red Underlined)
In Debuggin section of Complier options do the following:
- Uncheck Generate debuggin info for GDB
- Check Strip symbols from executables
i dont have option of code generation in my ide 1.2.2
then what can i do???
pls help me………..
I’ve updated this document for Lazarus version 1.2.2, please read it again, and thank you for informing me about it.
Yes. That’s one way to do it. But from Lazarus v1.2 there is even an easier and more logical way of managing exe file size and also keeping the debugging option. This feature is great for managing a “Release” mode for creating exe for distribution. And a “Debugging” mode for catching and squashing nasty bugs! You can switch when you need it.
– Go to Project-> Project Options-> Compiler options
– Click the […] button
– Click “Create Release and Debug modes” button
Now you will notice a new “cog” icon in the toolbar. Clicking the arrow beside it will let you select either “Release” and “Debug” mode, according to your choice. Just Run/Build the project to check out the result. That would make life a lot simpler, right?
There are other quick ways to do reduce exe size for any project. And the exe can be even more shrunk down in size (down to ~700kb for a basic program). Details here:
http://lazplanet.blogspot.com/2013/03/how-to-reduce-exe-file-size-of-your.html
Thank you Adnan, I have tested it, and yes it is more simple
شكرا لكم كنت و لا ازال متابعا مهتما بابداعاتك
هذه من الاشياء المهمة في لازاروس خاصة عند انتاج الاصدار النهائي