I'm spending some time focusing on migration of applications written with old versions of Delphi. First step I want to focus on in this blog post are the technical issues making things difficult. Later on, I'll move to potential solutions. For now, let's keep the reason why one wants to move (or prefers to stay with his current, old version of Delphi) at a side.

There are several issues our customers are facing when migrating the code of their old VCL applications to a recent version of Delphi (still building Win32 VCL applications). In most cases, if you reopen an existing Delphi 7 application in Delphi XE4 and try to recompile it you’ll receive a lot of errors.

Here are some technical issues preventing an application to re-compile directly (I might be missing others):

1. Existing compiled code (DCU, BPL) Delphi developers built or received (in case of third party components) cannot be used in newer versions of the product. All code needs to be recompiled from the original sources

2. Delphi developers on versions before 2009 have to upgrade their string management source code to embrace Unicode (this is the single most relevant change to Delphi causing incompatibility). Unicode support also implies mapping to a different set of Windows API functions (Wide vs. Ansi)

3. Depending on their original version, developers have to fix some minor issues related with functions and classes moved to different units, signature changes, features deprecated over time, etc. Nothing major if you know what to look for...

4. Many applications stuck on old versions of Delphi are still based on the BDE (or other old database engines, not fully supported any more).

5. Applications might use third party components available only in compiled format and not available any more (see issue 1 above)

6. Applications might use third party components not available any more, and with source code that doesn’t compile (due to the issues 2, 3, 4). At times, a new version of the component is available but hard to find (for example, now part of a different library)

7. Applications might use third party components still available today, but with many incompatible changes, causing them a hard time to migrate their code to the new version of such components (understandably, many components added features or changed their interfaces over such a long time frame)

Did you see any other technical reason blocking the migration of existing Delphi source code on older versions of the product? In there any specific detail about one of the points above you want to add? Again, let's keep solutions and success stories (I know there are many) for a later blog post...

(PS: Please don't get into "you did Unicode migration wrong" kind of comments, as I find tham pointless by now, and would likely delete them!)