Recent

Author Topic: size of Win executable  (Read 15342 times)

focana

  • Newbie
  • Posts: 1
    • http://www.ugr.es/~focana
size of Win executable
« on: February 09, 2007, 01:13:02 pm »
Hi all,

I am a new user of Lazarus but with some experience with
Borland Pascal and Delphi. First of all, I will like to thank to the
Lazarus development team for the possibility of using the
Pascal language.

I have a program coded in Pascal with a GUI developed in Delphi
under Windows.
Some weeks ago I decided to get a Lazarus version of this program.
In order to practice with Lazarus, I designed the GUI with Lazarus
from the scratch. My problem is that I have observed that
the Lazarus executable release is a file whose size is
around 6826KB, much bigger than the Delphi executable, which
has a size of 478KB
.  ¿Is  a so big difference normal ?

Many thanks in advance

RudieD

  • Full Member
  • ***
  • Posts: 234
RE: size of Win executable
« Reply #1 on: February 09, 2007, 05:39:35 pm »
The FRED Trainer. (Training FRED with Lazarus/FPC)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: size of Win executable
« Reply #2 on: February 09, 2007, 08:32:28 pm »
This is also on the FAQ on the Wiki

Avram

  • New member
  • *
  • Posts: 8
    • http://www.avramovic.info
RE: size of Win executable
« Reply #3 on: February 12, 2007, 05:16:16 pm »
Shortly: Use strip to strip debug data (at least this is working in Linux, but I think you'll get strip.exe with Windows version of Lazarus). Then you can use UPX or othere exe compressor to additionally compress executable.

Gintas

  • Jr. Member
  • **
  • Posts: 71
    • Developer's Diary
size of Win executable
« Reply #4 on: February 12, 2008, 09:33:52 am »
I am using 0.9.24 and tried to compile basic program with LCL,some kind a notepad. I tried variuos linking options,but always get big 11.5mb executable file. I tried to check all options as in image from wiki page above.

I will try command line options. I would be a mircale to get a file less than one MB. :)

That huge executables stops me from making some projects on Lazarus IDE.

Almindor

  • Sr. Member
  • ****
  • Posts: 412
    • http://www.astarot.tk
size of Win executable
« Reply #5 on: February 12, 2008, 12:00:29 pm »
That's really sad.. are you still using diskettes? Might be better to update, such a horrible 1mb on todays 120gb drives, must be killing the customers...

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
size of Win executable
« Reply #6 on: February 12, 2008, 03:15:32 pm »
Hey Alminador2, its not a question of diskettes, you see, I have installed Lazarus on a USB stick (2 GB) and all my projects are there, and compilying, compyling, now I already have 600 MB of disk full, thats a lot on a USB stick.
However the solution is already available, so I invite newbies to read the FAQ, questions like the one above are so frustrating for old forum readers

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
size of Win executable
« Reply #7 on: February 13, 2008, 05:53:09 am »
Quote
I tried variuos linking options

such as?

Try to find these switch in compiler options dialog, then check them (uncheck others):
-CX -XX -Xs -Os

An empty form should have a size about 900 KB.

MisterKode

  • New Member
  • *
  • Posts: 33
    • Stuff I like, yeh
size of Win executable
« Reply #8 on: November 15, 2008, 05:42:54 am »
I tried all the options as well and my executable comes out at 12 meg no matter what I do. For a program with only 2 buttons, a few labels and editboxes, it sure seems to be a huge filesize    :?
It's not a bug...just an undocumented feature ;)
Carl Kruck :: www.graphicdreamz.net
Intel Core 2 Quad, 8Gb RAM, Nvidia Geforce GTX 260, Windows 7 HP SP1 64-Bit

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
size of Win executable
« Reply #9 on: November 15, 2008, 07:46:14 am »
There seems to be something wrong with the linker, just do manual strip as suggested above.
e.g.: strip -s yourprogram

arnoldb

  • Jr. Member
  • **
  • Posts: 97
size of Win executable
« Reply #10 on: November 17, 2008, 07:10:15 pm »
All

This question comes up so frequently - Is there a way to add a 'sticky' subject on the forums so that everyone can get it the moment they start browsing the forums?

Just a thought.... But it might be handy

 

TinyPortal © 2005-2018