0

I have project where is missing 1 pas file. But I have this file .dcu

It is possible to use 1 .dcu and other .pas files to compilation of new version?

  • 1
    Yes, if the `.dcu` was made with Delphi 7. – Tom Brunberg Feb 16 '17 at 12:55
  • 3
    If the dcu depends on any units that you have source for, you won't be able to modify the interface section of those used units. – David Heffernan Feb 16 '17 at 13:13
  • Not just Delphi 7, but the exact precise same compiler version / build. Even just one build number off on the compiler version could be catastrophic. – Jerry Dodge Feb 16 '17 at 15:05
  • 2
    That shouldn't be the case, @Jerry. The DCU format is intended to be stable within releases of a single major version. – Rob Kennedy Feb 16 '17 at 16:59
  • @Rob Indeed, perhaps I was a bit mis-leading. What can happen though is, for example, the DCU may have been compiled for a later release of D7 which had a slightly different interface in the RTL, and when trying to compile that DCU in an older version of Delphi which didn't yet have that modification, that's what I meant. Always safe to be sure everything perfectly matches. – Jerry Dodge Feb 16 '17 at 17:16
  • 2
    But that's just it, @Jerry. Updates to Delphi do not change the interface of a unit precisely *because* it would break existing DCUs. I'm not aware of Borland, CodeGear, or Embarcadero ever intentionally shipping a breaking change of that nature in a Delphi release update. – Rob Kennedy Feb 16 '17 at 17:42
  • @Rob Fair enough, I'm just a better safe than sorry guy :-) – Jerry Dodge Feb 16 '17 at 18:03

0 Answers0