问题描述
我最近使用了 delphi xe,但由于 rtti(我认为),exe 的大小非常大
i have use delphi xe recently but exe size is very big because of rtti(i think)
如何删除 rtti ,我可以在不压缩的情况下使我的应用程序大小与 delphi 2009 应用程序 (490 kb) 一样小吗?以及rtti有什么用
howto remove rtti , and can i make my application size as small as delphi 2009 application(490 kb) without comprssion; and what is the use of rtti
推荐答案
简而言之(完整故事由初始答案中的链接提供):
In short (full story provided by links in the splash's answer):
{$RTTI 显式方法([]) 属性([]) 字段([])}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
请注意,从 XE6 开始,这需要在每个人中您想要禁用 RTTI 的单元. 在此之前(XE5 及以下),它可以位于 DPR 文件中,并将应用于项目中的所有单元.
Note that as of XE6 and newer, this needs to be in each individual unit for which you want to disable RTTI. Before that (XE5 and below) it could be in the DPR file and would apply to all units in the project.
这篇关于delphi xe 禁用 RTTI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!