Delphi – Compile delphi 5 code in Delphi 2009

dcc32delphidelphi-2009

It is possible to work with a Delphi 5 project in the Delphi 2009 IDE by referencing the Delphi 5 version of dcc32?

If so are there any issues to watch out for concerning the way that project settings (search paths, conditional defines etc.) are implemented in 2009?

Edit: Just to clarify I am also upgrading the project to Unicode but will still need to debug and run releases in the old configuration

Best Answer

It depends on what you're trying to accomplish and what limitations you are willing to accept.

As far as I know, you can't use the Delphi 2009 IDE to maintain Delphi 5 projects directly. For example, even if you stick to functionality that's common between the two, some properties that are not supported in Delphi 5 are written to your DFMs, causing an error at run time.

I've maintained projects and library code that were written in Delphi 2005/2006/2007 that was also being used in Delphi 6/7. I usually edited and debugged these using the latest IDE. I had separate project files for each target version and made sure they all used the same memory manager. Finally, I had an automated build process and unit tests that would strip incompatible properties out of the DFMs (my own DFM Scrubber), make sure all of the targets always compile and run unit tests, which are also recompiled for each target.

All in all, it's more effort and I wouldn't recommend it unless you have a specific requirement to do so.