How to recompile modifications to VCL source file (Menus.pas)?

Here is how I handle modifications to VCL source files:

  • Make a copy of the file in your project structure. Either add the file to your project, or make sure the search path finds your modified file.
  • Make modifications, but only in the implementation section. You are not able to modify the interface section if you use any other units that themselves use the unit you are modifying.
  • Explicitly set the compiler options at the top of the modified source file. Use default Delphi options, as found by pressing CTRL+O O in a default vanilla project.

I'd guess that one of the final two bullet points is what is tripping you up.