EXE Size is too big in Delphi XE2

雨燕双飞 提交于 2019-12-17 20:24:46

问题


I have created a simple project in Delphi XE2 with only 3 or 4 delphi forms which are only 8 or 9 KB in size. But If I see the exe size, its 12MB. I don't know how? What could be the reasons?


回答1:


You're using the default Debug build configuration, which includes debug information in the exe.

You normally change the build configuration to release in order to produce a smaller exe for distribution, at the expense to lose the ability to debug it within the Delphi IDE (step by step).

Take a look at How to change Delphi Build configuration?

Using Delphi XE 3 with a simple form, the Debug exe is 10,995Kb whereas the Release exe is only 2,326Kb long. You may argue the latter is still big, but that's another question:

  • How to achieve smaller size of the executable?
  • What Can I Do To Reduce My Executable's Size (Delphi)?
  • Create smaller delphi-xe executables (delphi.about.com)



回答2:


Okay, Now I know, I was compiling exe in build mode. When I switched to release mode and then compiled, the size was in KBs.



来源:https://stackoverflow.com/questions/13598678/exe-size-is-too-big-in-delphi-xe2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!