Delphi 2010: Compiler understands $(platform) but not $(config), but debugger understands neither.
Posted by jpluimers on 2015/09/17
If, like Delphi XE and higher, your organise your projects to use output directories like ...Bin\Delphi####\$(Platform)\$(Config), and back-port to Delphi 2010, then
- The Delphi 2010 compiler puts the files in almost the right directory
...\Bin\Delphi2010\Debug\Spring.Tests.exe - The Delphi 2010 debugger barfs with this message:
--------------------------- Error --------------------------- Could not find program, '...\Bin\Delphi2010\%Platform%\%Config%\Spring.Tests.exe'. --------------------------- OK ---------------------------
So you might think that it is enough to hard code this in your base configuration:
- Platform=Win32
Well no, the debugger still shows the above error message. Despite the compiler putting it in the correct directory: ...\Bin\Delphi2010\Win32\Debug\Spring.Tests.exe
So there are 3 configurations for the output directory:
- Base (for documentation purposes only)
Bin\Delphi2010\$(platform)\$(config)
- Debug
Bin\Delphi2010\Win32\Debug
- Release
Bin\Delphi2010\Win32\Release
You might think: why is Spring4D still supporting Delphi 2010?
Two simple reasons:
- many people still use it
- it produces relatively small executables, which still is important in some situations like producing our own Build tool and keeping binary versions of that in our version control system
–jeroen






jpluimers said
Delphi 2007 compiler inserts AnyCPU for Platform, does not understand config, and inserts %Platform%\%Config% in DCC_DependencyCheckOutputName to confuse the debugger.