FILE TOO LARGE lazarus / 9-Editor ---------------------------------------------------------------------- geroj13051981 · 2009-01-06 19:01 I'm developing an application using lazarus, it's normal that the .exe file is too large (23,6) with just six forms? ---------------------------------------------------------------------- Vincent Snijders · 2009-01-06 19:53 Yes, that is more or less normal, if you include the debug information in your application. Please read more about it in the FAQ. ---------------------------------------------------------------------- lazarillo · 2009-01-06 19:56 Hello, If you change some options of the compiler the weight of the .exe will be much smaller. ---------------------------------------------------------------------- Handoko · 2009-01-29 06:19 I have a similar case. I'm developing a simple inventory utility. Currently only 4 forms, the executable file size has reached 13,7 MB  . I think it's normal, because I use a lot of visual controls and self made units. My suggestion is: try using strip.exe to make it slim. But only if you ready to release it, because the debug information will be strip off. I'm happy with the result: 1.85 MB (before was 13,7!) My easy step to make it fat loss: - Copy the strip.exe from C:\lazarus\fpc\2.2.2\bin\i386-win32 - Paste it to your project folder - Using Command Prompt, type: strip YourProject.exe - And be happy with the result. ---------------------------------------------------------------------- JanRoza · 2009-01-29 07:08 Like the other persons above already mentioned, change your compile options to exclude debug information and you will see the exe file is only some 2 Mb. I keep the debug info included when developing and testing and after that I do one more compilation without debug info to get the small exe file which can easily be distributed. Jan ---------------------------------------------------------------------- Leledumbo · 2009-01-30 08:12 I got a IMHO better solution. Since Lazarus uses fpc.cfg, why not use that? Here's part of mine: Code: [Select]#IFDEF OPTIMIZE   -O3 # Maximum optimization, there's no -O4 yet   -XX # Turn on smartlinking   -Xs # Exclude debug information #ENDIF #IFDEF DEBUG   -Crtoi # Turn on all checks   -XS    # Use static linking, debugging doesn't go well with smartlinking   -g     # Generate debug info   -gl    # Generate line number debug info   -gh    # Generate heap profiling #ENDIF You can then add -dOPTIMIZE to other options tab. Simple, isn't it? Btw, I also recompile my Lazarus with OPTIMIZE defined. With an exception that -O3 got replaced by -O1 (some LCL bug not yet resolved).