Release Notes for XE7

From RAD Studio
Jump to: navigation, search

Go Up to What's New in Delphi and C++Builder XE7


These Release Notes contain important information that might not appear in the main product documentation. We recommend that you read this page in its entirety. For the most current version of these notes, see http://docwiki.embarcadero.com/RADStudio/XE7/en/Release_Notes_for_XE7.

Contents

Installing, Uninstalling, and Upgrading Your Product

Before you install, uninstall, or upgrade the product, read the Install.htm and License.rtf files. The Install.htm file gives the system and free space requirements, and installation and upgrade procedures. License.rtf is your Software License and Support agreement.

Read the most current version of the Install.htm file on the docwiki at Installation Notes for XE7.

Here are other ways to access the Install.htm file:

  • Open the Installer.zip file.
  • Click the Help button on the Install launcher.
  • Open Install.htm in your product installation directory; by default, this directory is:
    C:\Program Files\Embarcadero\Studio\15.0
    • For more information about installation, deployment, and licensing issues, see the Install.htm, Deploy.htm, and License.rtf files that are installed by default at C:\Program Files\Embarcadero\Studio\15.0 (on 64-bit Windows, the directory is Program Files (x86)).

General Notes

Your Product Includes Licenses for Previous Versions

Licenses for previous versions of the product are included with your XE7 license.

  • Delphi XE7 includes licenses for Delphi XE6, XE5, XE4, XE3, XE2, XE, 2010, 2009, 2007 and 7.
  • C++Builder XE7 includes licenses for C++Builder XE6, XE5, XE4, XE3, XE2, XE, 2010, 2009, 2007 and 6.

For more information about licenses, see Installation Notes for XE7 or the Install.htm file in your product installation directory.

Support for iOS 8

RAD Studio now supports iOS 8, except for the iOS 8 Simulator. For more information, see FireMonkey Platform Prerequisites.

FireMonkey Notes

Names Must Be Assigned to All Components Before Creating a New View in the Form Designer

If you open an older FireMonkey app in XE7, you might encounter the following error message:

 Cannot inherit from form 'FormName".  It contains a component with a blank name property.

The new Views Inheritance system requires that you assign a name to all components before you can create a new View in the Form Designer.

iOS App Might Not Close/Reopen Properly After Running without Debugging on the Device

If you run your iOS app on the device without debugging and then kill the process of your application on the device, you will need to run the PAServer reset command if you want to run the process outside the IDE; type 'r' at the PAServer command prompt.

C++Builder Notes

Specifying Dependent/Required Packages When Using a Component in a C++ Package

When using an existing component in a C++ package, the IDE does not automatically add the dependent (required) package for the component. You need to perform this step manually.

Without the relevant dependent (required) packages, the C++ package might fail to link because the linker cannot locate obj files that must be initialized when that component is used. To avoid such linker errors, you need to add the component's package and its dependencies to the Requires node of your C++ package (in the Project Manager).

The following example illustrates how to determine the required packages for a component and eliminate the Unable to open 'xxx.obj linker errors by creating a dummy VCL Forms Application that uses the component.

By default, a newly created C++ VCL Forms Application links with the rtl and vcl packages, as shown by the *.bpi files listed on the linker line:

Ilink32 command line:

 c:\BDSLoc\bin\ilink32.exe ... -aa -V5.0 -Tpe  c0w32w rtl.bpi vcl.bpi memmgr.lib sysinit.obj .\Win32\Debug\Project30.obj .\Win32\Debug\Unit26.obj , .\Win32\Debug\Project30.exe , .\Win32\Debug\Project30.map , import32.lib cp32mti.lib , , Project30.res 

When you add new components, the IDE calculates dependent packages and adjusts the link line. To see this, add the component you want to use in a C++ Package to the VCL Form. This example uses the component TFDSchemaAdapter. Now rebuild the VCL application. You will see that several new .bpi files have been added to the link line:

Iilink32 command line:

 c:\BDSLoc\bin\ilink32.exe ... -aa -V5.0 -Tpe  c0w32w rtl.bpi vcl.bpi FireDACCommonDriver.bpi FireDACCommon.bpi xmlrtl.bpi dbrtl.bpi FireDAC.bpi FireDACSqliteDriver.bpi memmgr.lib sysinit.obj .\Win32\Debug\Project30.obj .\Win32\Debug\Unit26.obj , .\Win32\Debug\Project30.exe , .\Win32\Debug\Project30.map , import32.lib cp32mti.lib , , Project30.res 

These new .bpi files are the packages your component depends on. In the case of TFDSchemaAdapter, the .bpi files are:

   FireDACCommonDriver.bpi FireDACCommon.bpi xmlrtl.bpi dbrtl.bpi FireDAC.bpi FireDACSqliteDriver.bpi
   

So to use the TFDSchemaAdapter component in a C++ Package, you need to explicitly add each one of these bpi files as 'Required' references.

Mangling Change for DelphiInterface, DynamicArray, Set, and SmallString

The mangling of four Delphi-related types have changed in XE7:

Any library with interfaces using these types as parameters and built with earlier versions of C++Builder (XE6 and earlier) cannot be used with XE7. You will get unresolved externals when referencing these symbols.

The XE7 linker and TDUMP might not correctly unmangle these types when working with libraries built with XE6 or earlier. If you have libraries or objs that have functions that take any of these types as parameters, you must rebuild your libraries with XE7 so that they can be used by XE7.

If you run TDUMP on these earlier libraries or objs, TDUMP will be enabled to properly dump the symbol names. For example, here is a file that uses these types:

#ifndef _TEST_H
#define _TEST_H  

#include <System.hpp>  

bool di(System::DelphiInterface<IUnknown> p);
bool set(TVisibilityClasses p);
bool da(System::DynamicArray<int> p); 

#endif

When running XE7 TDUMP on the obj built with XE6 that implements these functions, you see:

 > tdump -oiRESOLVE test.obj
Turbo Dump  Version 6.5.2.0 Copyright (c) 1988-2014 Embarcadero Technologies, Inc.
      Display of File ..\XE6\test.obj

001B0D COMDEF
    Name:  1: 'di(System::DelphiInterface<{905}...'  virtual(_TEXT) Length: 0066 bytes
001BE6 COMDEF
    Name:  5: 'set(System::Set<{906}...'  virtual(_TEXT) Length: 0015 bytes
001C63 COMDEF
    Name:  7: 'da(System::DynamicArray<{905}...'  virtual(_TEXT) Length: 0063 bytes

That is, the XE7 TDUMP is unable to unmangle these types from objs built with earlier versions of the tools. You can use the TDUMP -m switch to see the unmangled (raw) symbol names. See TDUMP.EXE, the File Dumping Utility.

Explicitly Instantiating and Exporting Template Members from Exported Classes

When you export a class that contains template member functions from a DLL or a package (using the __declspec(dllexport) directive or the PACKAGE macro, respectively), these members must be explicitly instantiated and exported. Otherwise, consumers of the exported class might run into unresolved external errors regarding the template member.

Example:

mypackage.h:
#define PACKAGE __declspec(package)
class PACKAGE X
{
public:
  int foo();
  template<typename T>
  int bar(T *p)
  {
    return *p;
  }
};


mypackage.cpp:
#include "mypackage.h"
int X::foo()
{
  return 7;
}

The above resides in a C++ package.

The following app invoking the bar member gets an unresolved external:

myapp.cpp:

#include "mypackage.h"

int g = 6;

int main()
{
  X x;
  x.foo();
  return x.bar(&g);
}
 Error:
 Error: Unresolved external 'int X::bar<int>(int*)' referenced from C:\USERS\ADMIN_000\APPDATA\LOCAL\TEMP\MYAPP-233656.O

To resolve the error, add the following line to mypackage.cpp:

template PACKAGE int X::bar<int>(int*);

The added line explicitly instantiates and exports the member template used by the myapp.cpp source.

Downloading DirectX Header Files

We only ship DirectX headers inside the Microsoft Windows Platform SDK. If you encounter errors such as "d3d.h file not found", the HPP generated for that Delphi unit contains #include <D3D*.hpp>. You can do either of the following:

  • Add a {$NOINCLUDE Winapi.D3DX9} directive to the unit that uses the D3D unit and regenerate the HPP file of that unit. The regenerated HPP will not contain the #include <Winapi.D3DX9.hpp>.
  • Download the DirectX SDK that the D3D header relies upon. You can download the DirectX SDK for free from Microsoft. For more information, see Where is the DirectX SDK? (Windows).

Events with Structs or Sets of 5-8 Bytes Are Not Valid for BCC64

Events generated by the IDE that take a struct or set that is between 5-8 bytes are valid for 32-bit C++, but not valid for 64-bit C++. This only affects cases where the type is passed by value. For cases where the type is passed by reference, there is no difference between Win32 and Win64.

For example, an Access Violation occurs when accessing the TPoint &MousePos parameter of the OnContextPopup event, because the TPoint &MousePos parameter is invalid on the Win64 platform. If you look at the __closure type declaration, you can see the difference between Win32 and Win64. Here is the __closure declaration for the PopupMenu event of TControl:

#ifndef _WIN64
typedef void __fastcall (__closure *TContextPopupEvent)(System::TObject* Sender, const System::Types::TPoint &MousePos, bool &Handled);
#else /* _WIN64 */
typedef void __fastcall (__closure *TContextPopupEvent)(System::TObject* Sender, System::Types::TPoint MousePos, bool &Handled);
#endif /* _WIN64 */

To get the code to work for both Win64 and Win32, you must #ifdef the IDE-generated handler as follows:

#ifndef _WIN64
void __fastcall TForm46::FormContextPopup(TObject *Sender, TPoint &MousePos, bool &Handled)
#else
void __fastcall TForm46::FormContextPopup(TObject *Sender, TPoint MousePos, bool &Handled)
#endif
{
  ShowMessage(System::String().sprintf(L"Mouse at (%d,%d)", MousePos.X, MousePos.Y));
}

Cannot Programmatically Assign IDE-Generated Event Handlers that Have Interfaces as Parameters

Delphi interfaces are exposed as templates in C++. That is, Delphi interface IFoo becomes _di_IFoo in C++. But the IDE is instead generating IFoo* in event handlers. This causes two problems:

  • The event handler generated by the IDE cannot be assigned to the event programmatically, because the compiler sees the mismatch in the event's declaration and the handler declaration.
  • The event handler does not get the prologue/epilogue code generated by the C++ compiler for Delphi interfaces.

NOTE: This issue affects newer runtimes like REST, FireDAC and even Live Bindings. All of these have events that have interface types as parameters. VCL, however, does not have events with interface parameters.

For example, following is a standard closure event handler (the added comment indicates the point of difference with the generated handler):

typedef void __fastcall (__closure *TFDConnectionRecoverEvent)(System::TObject* ASender, 
  const Firedac::Stan::Intf::_di_IFDStanObject AInitiator, // <<< ***
  System::Sysutils::Exception* AException,
  Firedac::Phys::Intf::TFDPhysConnectionRecoverAction &AAction);

But here is the IDE-generated event handler (also with an added comment):

void __fastcall TForm1::FDConnection1Recover(TObject *ASender, 
          const IFDStanObject *AInitiator, // <<< ***
          Exception *AException, 
          TFDPhysConnectionRecoverAction &AAction)

You can safely use the handler generated by the IDE. However, if you attempt to assign the handler programmatically, the compiler generates an error because of the mismatch between the closure and the handler's signature.

The Workaround: If you want to refer programmatically to the handler, perform the following steps:

  1. Clear out the event in the Object Inspector (the IDE will not delete the handler as long as it is not empty).
  2. Move the handler out of the __published section. (You can move it to the public, protected, or private section of the class.)
  3. Update the declaration and definition of the handler to match the closure declaration.
    For example, in the case of our example, replace IFDStanObject * with _di_IFDStanObject.

Now you should be able to assign the handler programmatically.

Delphi Notes

Cannot use 'absolute' Keyword in Interop between Delphi and C++Builder 64-bit Windows

The "absolute" Delphi directive/keyword is not supported in the interface section of a Delphi app when run interop with Win64 C++. However, the "absolute" keyword can be used in the implementation section.

IDE Notes

You Must Recreate Your iOS 9 SDK in December 2015 Subscription Update to Build C++ Applications for iOS 8

If you upgraded from RAD Studio XE7 to RAD Studio XE7 December 2015 Subscription Update, and you have previously created an iOS 9 SDK in the IDE, any C++ application that you build using that iOS 9 SDK does not work on iOS 8.

To solve this, you must remove your iOS 9 SDK from the IDE using the SDK Manager, and create a new iOS 9 SDK.

In Multi-Device Form Designer, Can Only Delete a Component from the Master View

When you try to delete a component, such as a TButton, from a different view (not the Master view), the following error message appears:

 Selection contains a component, Button1, introduced in an ancestor and cannot be deleted

The solution is to delete the component from the Master view. For more information about views, see Form Designer.

Renamed iOS Project Might Fail at Run Time or When Debugging

Renaming a project in the IDE can cause an iOS app to fail at run time and debug time. To correct the issue, do the following:

  1. Select Project > Deployment.
  2. In the Deployment Manager, click the Revert To Default speed button.

Mobile Setup Wizard Content Is Blocked on Windows Server 2008

RAD Studio shows you the Mobile Setup Wizard when you are working on a mobile application and you:

  • Need to follow some configuration steps to continue.
  • Run into an issue and might need help.

You can also select Help > Mobile Setup Wizard to open the Mobile Setup Wizard.

When this wizard opens in Windows Server 2008, Windows shows an Internet Explorer dialog box. You must add the content of the wizard to the whitelist of Internet Explorer in order to see the content of the wizard.

You can see the mobile setup wizard here:

Version Info Settings Inheritance

To include version information in your project targeting Windows, do not change the key values on the All Platforms target. Instead, change the values for both platforms (32-bit and 64-bit) individually. The targets do not inherit the values properly from the All platforms target.

Database Notes

Updating OpenSSL for BaaS, Cloud, or DataSnap (with https) Apps

If you run your app results in an exception such as the following:

 Project Project1.exe raised exception class EIdOSSLCouldNotLoadSSLLibrary with message 'Could not load SSL library.'. 

then you should download the latest OpenSSL binaries from https://www.openssl.org/related/binaries.html. Choose OpenSSL for Windows.

Workaround for Linker Errors for TClientDataSet/TSQLConnection with Driver = IBLite/ToGo

If you drop a TClientDataSet followed by a TSQLConnection, and set the Driver property to IBLite/ToGo, and then try to compile for the Android target platform, you might get a series of linker errors.

These linker errors can be worked around by adding the Data.DBXInterbase unit to the uses clause before the Datasnap.DBClient unit, or by passing -lgnustl_static in "Options passed to the LD linker" in Project > Options > Delphi Compiler > Linking.

Using Run-Time Packages with C++ FireDAC DataSnap Driver

If you use the FireDAC DataSnap driver in 64-bit C++ applications built with run-time packages, you might receive an error at run time. To avoid the error, you need to add DataSnapClient to the run-time packages, following these steps:

  1. Project > Options > Packages > Runtime Packages.
  2. In the Runtime package import libraries field, add DataSnapClient to the list.

This setting resolves the problem and adds DataSnapClient.bpi to the link line rather than DataSnapClient.a.

64-bit Windows C++ Application with a FireDAC Component Might Raise Error

The following error is raised when attempting to compile an application using a single FireDAC component, when the platform is Windows x64 with static linking:

c:\program files (x86)\embarcadero\studio\<n.n>\Bin\CodeGear.Cpp.Targets : warning : Warning: Out of memory
c:\program files (x86)\embarcadero\studio\<n.n>\Bin\CodeGear.Cpp.Targets(2751,5): error MSB6006: "ilink32" exited with code 2.

The workaround is to not link FireDAC statically in Win64 C++ apps.

Workaround for INI File Errors with FireDAC

In previous versions, FireDAC created INI files in "C:\Program Files", which in modern Windows versions is read-only for regular Windows users. If you are getting errors like "Can't modify file" when adding new FireDAC connection definitions using the Data Explorer or FDExplorer, then FireDAC INI files might still be located in "C:\Program Files". To resolve the issue, you should download and run the FDFixIni utility, which relocates FireDAC INI files to a correct location and updates the FireDAC registry. By default, the correct location is "C:\Documents and Settings\All Users\Documents\Embarcadero\Studio\FireDAC".

To resolve the issue:

  • download FDFixIni from the Registered Users site: http://cc.embarcadero.com/item/29812;
  • extract EXE from downloaded archive;
  • and run it. If the utility runs successfully, it will output two lines with Move [old location] to [new location].

InterBase XE3 Developer Edition Accompanies Some Editions of RAD Studio XE7

This note pertains to users who have both an earlier version of RAD Studio (XE3, XE4, XE5 and/or XE6) and RAD Studio XE7 installed on the same machine. In this note, the mention of RAD Studio also implicitly includes Delphi and C++Builder editions.

RAD Studio XE3, XE4, XE5, XE6, and XE7 all include InterBase XE3 Developer Edition. Each license suite for these versions of RAD Studio includes a license for InterBase XE3 Developer Edition as well. Since all these RAD Studio license suites are visible system-wide, only one license of InterBase XE3 Developer Edition can be used at any time.

If you happen to be running the "InterBase XE3 Developer Edition" that came with an earlier RAD Studio version (instance "gds_db", "rad_xe4", or, "rad_ibxe3"), you will not be able to start a simultaneous "developer_ibxe3" instance of InterBase XE3 Developer Edition that comes with RAD Studio XE7. If you try to start this, you will receive an error dialog stating "InterBase licensing error". Further inspection of interbase.log from your "developer_ibxe3" instance will show "Registration file error: License is in use by another instance of InterBase".

Workaround for InterBase XE3 Licensing Errors

  1. Stop your "gds_db", "rad_xe4" or "rad_ibxe3" InterBase instance, as the case might be, from your older RAD Studio install. If you have set up this instance as a Windows Service, please disable it in the system Service Control Panel also.
  2. Restart your RAD Studio XE7 installed copy of InterBase XE3 "developer_ibxe3" instance. It should now launch successfully with the proper license.

The above mentioned earlier RAD Studio versions, and applications built by them, can also work with the updated InterBase XE3 Developer Edition installed with RAD Studio XE7. Have your older RAD Studio IDE tools and applications connect to your database via TCP loopback to this InterBase instance. For example:

localhost/developer_ibxe3:<dbpath>

In the older RAD Studio IDE, you might also want to select Tools > Options > Environment Options > Environment Variables and add the following new "User overrides" entries for making local client connections.

  • Variable: IB_Protocol
    • Value: developer_ibxe3
  • Variable: InterBase
    • Value: C:\Program Files (x86)\Embarcadero\Studio\15.0\InterBaseXE3

FastReport Note

FastReport, the third-party report add-in, is available as a download from the Registered Users site, as follows:

After downloading, unzip the zip file and run the FastReport installer. This installs the FastReport 4.0, FR4, and FastReport 4 exports categories of components in the Tool Palette. For more information, see FastReport in our documentation.

Upgrading from Delphi 7

If you are upgrading a project that was created in Delphi 7 or another early release, and the project has a custom file extension, you need to choose Project > Options > Application, and set the Target file extension to match the type of your project (.exe, .dll, or .bpl).

IME Note

In order to use IME (Input Method Editor) for localizing VCL or FMX apps on Windows 8 machines, you need to set a special switch to revert IME behavior. Two important Microsoft functions, ActivateKeyboardLayout and ImmSetConversionStatus, do not work on Windows 8. For more information, see "Switch text input changed from per-thread to per-user" at http://msdn.microsoft.com/en-us/library/windows/desktop/hh994466.aspx.

Help Notes

Location of Installed Help

By default, the help files are installed at
C:\Program Files\Embarcadero\Studio\15.0\Help\Doc

Microsoft Document Explorer 2008 (DExplore.exe)

DExplore is required in order to view the Delphi and C++Builder locally installed documentation. If you do not have Microsoft Document Explorer 2008 installed, it will be installed as part of the Help System Install.

  • It is a known issue that a pre-release version of the license for Microsoft Document Explorer XE is displayed.
  • If you receive an access violation when you press F1 in the IDE, it is possible that an incompatible version of DExplore.exe has been installed. To verify the version, run DExplore.exe standalone, check the Help | About box: If it says QFE, a quick fix has been installed by either Visual Studio 2008 or Prism. To fix this problem, go to the Control Panel and run a Repair operation on the Embarcadero Delphi and C++Builder Help System.

See Also