How can I set the $RTTI directive for the entire project?

前端 未结 5 2150
暗喜
暗喜 2021-01-03 08:48

I\'m working on migrating an old project from Delphi 2007 to Delphi 2010. One thing I\'ve found is that the resulting executable has more than doubled in size, and the orig

5条回答
  •  走了就别回头了
    2021-01-03 09:39

    Are you certain this is caused by the new RTTI info? While it's a lot of data it shouldn't really double the size of your application.

    Check that it's not including debug info in the release build executable. (Project options -> Delphi Compiler -> Debug information should be False)

    As for the question, I use {$WEAKLINKRTTI ON} before the uses clause in the dpr file and it seems to work fine.

提交回复
热议问题