What's New in RAD Studio, Delphi and C++Builder XE5 Update 2

By: Tim DelChiaro

Abstract: C++Builder for iOS, Delphi updates, FireMonkey enhancements and other useful info

This information comes from the Embarcadero Doc Wiki. Clicking links in the article will take you to the doc wiki.

See more of what is new in RAD Studio XE5, Delphi XE5 and C++Builder XE5 at http://docwiki.embarcadero.com/RADStudio/XE5/en/What%27s_New_in_Delphi_and_C%2B%2BBuilder_XE5

    What's New in XE5 Update 2

    ★ C++Builder application development for the iOS device

  • BCCIOSARM.EXE, the C++ Cross Compiler for iOS Device (our new compiler):
    • BCCIOSARM supports development for the iOS Device target platform and does not support the iOS Simulator.
    • BCCIOSARM is one of our Clang-based C++ Compilers (our latest generation of C++ compilers).
    • BCCIOSARM does not support certain types that are not accepted on the mobile platform (in particular, WideStringShortStringAnsiString, and AnsiChar).
      Note that AnsiString and AnsiChar do still exist in C++Builder, but they are scaled back in the mobile environment; some methods might not be available on mobile.
    • BCCIOSARM uses automatic reference counting (ARC) for C++ iOS in order to be compatible with Delphi iOS.
      All the ARC management is handled inside the BCCIOSARM compiler, so you should not need to do anything different in order to work in the C++ iOS ARC environment. Your code can still use pointer syntax for a Delphi class instance. The BCCIOSARM compiler treats these pointers as special pointers, and thus neither declarations nor usage have to change.
  • iOS Mobile Application Development:
  • C++ Strong Aliases:
    • Earlier versions of Delphi mapped built-in types such as NativeIntNativeUInt, and WordBool to C++ built-in types. Newer versions of Delphi handle these types as strong aliases, such as TAlphaColoror TImageIndex. In order to be compatible with the change, C++ will also create strong aliases using a class wrapper.
      For example, if you need to handle a NativeInt, you need to specify the type (NativeInt).
      • For example:
        NativeInt i = 10; // error
        NativeInt i = NativeInt(10); // OK
  • C++ Unrestricted Unions:
    • Unions can now contain objects that have a non-trivial constructor. See Union Declarations.
    • New: You can now use HPPEMIT Delphi compiler directives for linking and generating C++ namespace declarations.
  • $HPPEMIT LINKUNIT replaces #pragma link for the iOS device target platform. See HPPEMIT.
  • QueryInterface for IUnknown works a bit differently for BCCIOSARM than for the other C++ compilers. You need to override QueryInterface as described in System.IUnknown.QueryInterface.
  • C++11 features are partly supported for iOS:
    • Core C++11 features typically work with BCCIOSARM. This includes variadic templates, static assertions, multi-declarator auto, Lambda expressions, and others.
    • Standard (Run-time) C++11 features are typically not supported by BCCIOSARM. This includes initialization of class objects by rvalues, Atomic operations, and others.
    C++11 features are documented in C++11 Features Supported by RAD Studio Clang-based C++ Compilers.


  • Delphi iOS: ABI Change for Default Alignment (Rebuild Required for Delphi iOS Apps):
The default alignment of field instructions for Delphi has changed from 8-byte (Quad Word) to 4-byte (Double Word) boundaries to match iOS requirements. This change affects Delphi iOS apps that are to be used with C++.
You need to recompile and rebuild your existing Delphi iOS projects (from XE5 Update 1 or earlier).
Be aware that when you recompile, an error might occur if the project contains DCUs (or object files or libraries) for which the source is not available on the search path.
Beyond this, most users might never need to deal with this change.
However, if you require a particular record size, you can reset the Record field alignment option on the Project > Options > Delphi Compiler > Compiling page for expedience.
For example, you can set the alignment to Double Word (8 bytes, equivalent to {$A8} or {$A+}).
Keep in mind that you might subsequently need to recompile your Delphi iOS project with the new 4-byte boundaries, and if this happens, you should set the Record field alignment to Word (equivalent to{$A4}) on the Compiling page.


Using Mobile Preview allows you to:
  • See your mobile app in a mobile-like form on your development system.
  • Run your mobile app without having to configure and connect a mobile device.
  • Verify and debug your program logic.


The application samples now have folders for Delphi and C++ (CPP) under the FireMonkey and FireMonkey.Mobile categories. The help pages for the affected samples have been updated with the correct location information. For example, see FMX.ImageSpin Sample andFMX.Mobile.ScrollableForm Sample (C++).

For more information about the samples, see Samples Descriptions.

    Release Notes for XE5 Update 2

Server Response from: ETNASC04