-2

I want to fix some bugs in my Delphi XE7 VCL source code. The easiest would be if I could simply edit the original file, recompile it and use it (replace the original DCU with the new DCU).

However, I get:

Unit %s was compiled with a different version of %s.

Is it possible to "patch" Delphi this way? Without recompiling the whole VCL?

Gabriel
  • 20,797
  • 27
  • 159
  • 293
  • What unit? Some can be modified (if you do it correctly), and some can't. None can the way you're attempting to do it. – Ken White Oct 24 '18 at 19:33
  • The "easiest" way is to copy the unit, put it in the project compile path, and modify only the implementation section, as Dmitry suggests, otherwise you'll have the problem you're seeing. Also as he suggests, if you modify the interface section, you'll need to include all dependent units. It may be of more use to indicate exactly what problem you want to solve, because it may be possible to achieve without modifying the VCL source at all. – Dave Nottage Oct 24 '18 at 22:37

1 Answers1

2

Of course, but (if you are making modifications in the interface section of the Delphi unit), you must also recompile other VCL units that use that modified file - you need to make sure these units are on the search path so that the compiler can see and rebuild them.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78