Recent

Author Topic: EXE size on WindowsXP  (Read 5274 times)

Gary

  • Guest
EXE size on WindowsXP
« on: March 13, 2005, 07:35:35 pm »
I'm getting about 5.50 meg size for a simple "hello world" EXE on a Windows XP system. AFAIK debugging is turned OFF. What is the reason for huge size?

Anonymous

  • Guest
EXE size on WindowsXP
« Reply #1 on: March 13, 2005, 07:40:29 pm »

Anonymous

  • Guest
EXE size on WindowsXP
« Reply #2 on: March 13, 2005, 08:07:41 pm »
Thanks... I had a suspicion that Lazarus itself might be compiled with debugging... but according to that link... only LCL is compiled with debugging.

Wouldn't it make sense to put it in the FAQ so people like me wouldn't have to ask the same question all the time?

BTW... using strip and upx, I got the exe down to 416KB from 5.5mg.

Anonymous

  • Guest
EXE size on WindowsXP
« Reply #3 on: March 14, 2005, 01:13:48 am »
Using strip takes a lot of the size, but, I am still curious why the size is 5 Mb.
There has to be a lot of redundant bytes in that exe file..

marmin

  • Jr. Member
  • **
  • Posts: 86
    • http://www.naton.org
EXE size on WindowsXP
« Reply #4 on: March 14, 2005, 01:20:41 am »
Remember, UPX is a compression utility and Lazarus should be able to reduce File size without any external application like zip or UPX.

I wonder why the initial size is 1.20 (with Strip). Additional code seems to be compiled with great efficiency! And the compiler is really, really fast.

I trust Lazarus will come up with some solution, it's beta now..

grz,
M.
Marmin^.Style
Location: Pointer Land!

Almindor

  • Sr. Member
  • ****
  • Posts: 412
    • http://www.astarot.tk
EXE size on WindowsXP
« Reply #5 on: March 15, 2005, 11:57:37 am »
Windows32 LD does not listen to --strip from lazarus. Therefore even if you use smartlinking and no debug info + stripping you get 9megs(atleast I did). Manualy going to the directory and typing strip myproject.exe It went down to ~1.5Mb and I can also UPX it to ~500kb.

I have no idea why ld doesn't stip when lazarus tells it to tho. It's only broken on win32
You also need to have stip in path to do what I did.
Strip is included in your FPC dir(if you got it with lazarus it's C:\lazarus\pp\bin\win32-x86

 

TinyPortal © 2005-2018