The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,737 other followers

Archive for September 17th, 2015

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

Posted in Delphi, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 1 Comment »

 
%d bloggers like this: