decreasing .exe size by removing units in "uses" section lazarus / 13-General ---------------------------------------------------------------------- wht244 · 2010-01-16 13:40 first, i created a program (doesn't matter what kind). i thought i will need to use some other components, so i placed some on the main form. that made "uses" section very long... but it's not about that. i'm thinking about .exe size. before placing it was about 3,5 MB. now it's about 4,6 MB. when i tried to decrease size of my application by removing components i don't need and removing some units in "uses" section - it didn't work. the size is as before - 4,6 MB. what should i do to resize it to 3,5 MB? ---------------------------------------------------------------------- José Mejuto · 2010-01-16 14:24 Quote from: wht244 on January 16, 2010, 02:40:23 pmfirst, i created a program (doesn't matter what kind). i thought i will need to use some other components, so i placed some on the main form. that made "uses" section very long... but it's not about that. i'm thinking about .exe size. before placing it was about 3,5 MB. now it's about 4,6 MB. when i tried to decrease size of my application by removing components i don't need and removing some units in "uses" section - it didn't work. the size is as before - 4,6 MB. what should i do to resize it to 3,5 MB? Hello, Check the .lpr it could have also a lot of units in uses section. ---------------------------------------------------------------------- wht244 · 2010-01-16 15:58 thanks for the reply. i found some units that i don't want to use in .lpr file. i removed them and it really reduced size of my application. ---------------------------------------------------------------------- bubulemaster · 2010-01-16 20:35 Hi, you can reduce size of exe by disabled debug symbol in compilation options. ---------------------------------------------------------------------- LazaruX · 2010-01-16 20:50 To reduce the size of the exe search in the forum there are A LOT of topics . BTW O though the compiler would automatically remove the not used units when compiling. ---------------------------------------------------------------------- marcov · 2010-01-17 12:33 Quote from: BPsoftware on January 16, 2010, 09:50:39 pmTo reduce the size of the exe search in the forum there are A LOT of topics . BTW O though the compiler would automatically remove the not used units when compiling. yes, stronger even, it can blend out single unused functions like Delphi does when "smartlinking" is on. But keep in mind that the compiler can't always determine what is unused or not (e.g. because it can be reached via RTTI, or is reachable via initialization/finalization sections)