Forum > Editor

Compiled file weight

(1/1)

ninobi:
Hi, I'm new for this forum.
I used a little, in the past, Delphi, but I abandoned it for its commercial nature. I tried, now, to start doing something with Lazarus. It was a small thing and inactive yet (only the GUI, by now), but, when I built it, I had a file of 5.43 Mb! I remember that Delphi compiled far lighter files...
Is it normal or was something wrong with my file?
nino

carbohydrate:
You can use the search function within the forum section (not of the website!).
Type "size", for example, and enjoy the results.

ninobi:
Many thanks and excuse me.
I searched with the keyword "weight" (English is not my language, it's quite clear) and did't find anything...
Bye,
nino

Anonymous:

--- Quote from: "ninobi" ---Many thanks and excuse me.
I searched with the keyword "weight" (English is not my language, it's quite clear) and did't find anything...
Bye,
nino
--- End quote ---

You can reduce the size of the executable using strip utility and *then* even reduce it further with UPX of the strip-ped executable.
You can strip the executable with the specific version of strip for the operating system you are targheting but you can UPX nearly any kind of executable without needing a specific UPX version.
An executable of a simple Lazarus app with a form and some logic (5,4 MB) is stripped to about 1,9 MB, then you can pack it with UPX to about 400 KB.
I think the answer to that question should be put in the FAQ at first place since it's a very common question (and I think Lazarus should at least strip executables by default, leaving as a project's option to don't use strip).

Navigation

[0] Message Index

Go to full version