0

I am using Delphi 11.3. Regardless of the compiler settings, every unit name included in the project ends up in plain text in the executable.

For example, the following empty unit adds the "MyMainUnit" string to the compiled file.

unit MyMainUnit;

interface

implementation

end.

I tried all sensible options for the compiler and linker, to no avail.

Is the only option to massage/encrypt the executable after linking?

Existing posts did not provide any help:

How can I remove strings containing type names from Delphi executables and globally disable RTTI for a project?

Delphi: Prevent method names from appearing in executables

Remove classes string name from compiled release exe

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Pablos85
  • 1
  • 1
  • 2
    `TObject.UnitName` provides the unit name at runtime, so it has to be stored in the executable somewhere. – Uwe Raabe Jun 21 '23 at 11:52
  • As far as I know, it is impossible. I created a program many years ago that gets all components forms and more from an executable. – Shlomo Abuisak Jun 24 '23 at 14:08

0 Answers0