delphidelphi-11-alexandria

Is there a compiler define that separates Delphi 11.0 from 11.1?


There are a few corrected issues in the VCL which had previous workarounds. Is there some method to identify that Delphi 11.1 is in fact installed and not 11.0 so the fix can be used rather than the workaround? The compiler defines for RTLVersion and CompilerVersion have not changed and are still 35.0. The static compiler define is also still VER350.


Solution

  • There is RTLVersion111 constant which you can use to determine whether you are dealing with 11.1

    const
      RTLVersion111 = True;
    
    {$IF RTLVersion111}
      Writeln('DEFINED RTL 11.1');
    {$ELSE}
      Writeln('NOT DEFINED RTL 11.1');
    {$IFEND}
    

    Each Alexandria update additionally defines new appropriate RTLVersion constant so the Alexandria 11.3 will have all following constants defined:

    const
      RTLVersion111 = True;
      RTLVersion112 = True;
      RTLVersion113 = True;