Preparing Developer Express VCL Components for C++Builder Applications

Applies to TestComplete 15.70, last modified on December 17, 2024

Developer Express VCL controls for C++Builder are distributed without debug information. Therefore, by default, TestComplete cannot obtain access to properties and methods of such VCL controls when they are used in the tested C++Builder application. However, there is a way to re-compile Developer Express VCL components for C++Builder with debug information and use this version of the components with debug information in your C++Builder applications to test them with TestComplete. In this topic, we will explain how you can prepare Developer Express VCL components for C++Builder and use them in your tested C++Builder applications.

We will consider preparing Developer Express VCL controls for Embarcadero C++Builder 2010 applications. To re-compile the components with debug information and re-install them, follow the steps below:

  1. Install Developer Express VCL components with integration into Embarcadero C++Builder 2010.

  2. After the installation is completed, copy the directory that contains the installed Developer Express VCL components (by default, the components are installed to the C:\Program Files\Developer Express.VCL directory) to another location on the hard disk (for instance, to the C:\Components\Developer Express.VCL_copy directory).

  3. Run the Developer Express VCL components installation program once again, select the Modify installation type and re-install the components without integration into Embarcadero C++Builder 2010. This will unregister the components from C++Builder.

  4. Create a new directory for the debug version of the Developer Express VCL components which you are going to re-compile. For simplicity, we will consider re-compiling only the Developer Express VerticalGrid control. You can re-compile other Developer Express VCL components with debug information in the same way. For instance, create the <RAD Studio Projects>\VerticalGrid_Debug directory for the debug version of the VerticalGrid component.

  5. Copy all of the .pas files from the directory that contains the copy of the Developer Express VCL components which has been created before (in our case, it is the C:\Components\Developer Express.VCL_copy directory) and from all of its subdirectories to the directory for the debug version of the components which has been created in the previous step (the <RAD Studio Projects>\VerticalGrid_Debug directory).

    Note: All of the .pas files from all of the subdirectories must be copied to one common directory. There can be files with identical file names. You can replace equally named files while copying.
  6. Run Embarcadero C++Builder 2010 and create a new package project (select File | New | Package from the main menu).

  7. Select File | Save All from the main menu and save the project to the directory for the debug version of the components to which you have copied the .pas files (<RAD Studio Projects>\VerticalGrid_Debug).

  8. Right-click the Contains directory in the project tree displayed in the Project Manager panel and select Add from the context menu.

  9. In the ensuing Add dialog, click the Browse button on the Add Unit tab. In the Unit file name dialog that appears, choose the .pas source files in which the components to be re-compiled are implemented. In our case, for the VerticalGrid control, choose the cxVGrid.pas and cxVGridReg.pas files that have been copied to the <RAD Studio Projects>\VerticalGrid_Debug directory. If you want to compile other components, specify the appropriate .pas source files. Click Open in the Unit file name dialog and click OK in the Add dialog.

  10. After the source files are included in the project, remove all *14.bpi files from the Requires directory in the project tree displayed in the Project Manager panel, if such files were included in the project. To remove such a file from the project, right-click the file in Project Manager and select Remove From Project from the context menu.

    Note: The *14.bpi files correspond to C++Builder 2010. For other versions of C++Builder, these files’ names can differ.
  11. Now, you need to set some project options so that the components are compiled with debug information. Select Project | Options from the main menu. In the ensuing Project Options dialog, perform the following actions:

    • Switch to the C++ Compiler | Debugging category and set the Debug information and Debug line number information options to True:

    • Switch to the C++ Compiler | Optimizations category and set the Disable all optimizations option to True:

    • Switch to the C++ Linker category and set the Full debug information option to True:

    • Switch to the Delphi Compiler | Compiling category and set the Use debug .dcus and Stack frames options to True, set the Optimization option to False and specify the “-JPHNE -M -LUdclstd -LUdcldb” parameter string in the Additional options to pass to the compiler option:

    • Switch to the Delphi Compiler | Linking category and set the Debug information and Include remote debug symbols options to True:

    Click OK to save the changes and close the Project Options dialog.

  12. Select Project | Build Project_Name from the main menu to build the project. During the compilation process, some .res, .dfm and other files from the Developer Express components package may be required for C++Builder to compile the component. In this case, find the required files (you can see their names in the Output window of C++Builder) in the C:\Components\Developer Express.VCL_copy directory (to this directory, we have saved a copy of the Developer Express VCL components) and its subdirectories and copy the files to the <RAD Studio Projects>\VerticalGrid_Debug directory (the directory containing the debug version of the component). Try to build the project again. Repeat this step until the project is built successfully.

  13. After the project is built, you must install the compiled debug version of the Developer Express VCL component to integrate it into C++Builder. Right-click the project node in Project Manager and select Install from the context menu. Now, the debug version of the component is integrated into C++Builder and can be used in your C++Builder applications.

You can perform the steps described above to re-compile other Developer Express VCL components with debug information. For the list of Developer Express VCL controls supported by TestComplete, see the Supported Developer Express Controls topic.

As you have re-compiled Developer Express VCL components with debug information and registered them in your Embarcadero C++Builder 2010, you can use these components in your C++Builder applications, and TestComplete can obtain access to Developer Express VCL controls used in your applications, to their properties and methods.

Note that besides compiling your C++Builder application with debug information, you must re-compile Developer Express VCL components with debug information as well. Before compiling your project, set the project options as it is described above in step 11 (except for setting the Additional options to pass to the compiler option -- you do not need to set the “-JPHNE -M -LUdclstd -LUdcldb” value for this option).

When you try to compile your C++Builder application using the re-compiled debug version of Developer Express VCL controls, C++Builder may require some additional source files, and this can cause errors during the compilation process. Search for the required files in the directory that contains the re-compiled debug version of Developer Express VCL controls (in our case, these components reside in the <RAD Studio Projects>\VerticalGrid_Debug directory) and copy the files to your application project’s directory. After that, try to compile the application again. If C++Builder requires other files from the components’ package again, repeat this operation until your application is compiled successfully.

To learn how to include debug information in applications created with Embarcadero C++Builder 2010, see also Compiling C++Builder 2010 Applications With Debug Information.

See Also

Debug Info Agent™
Testing C++Builder Applications
Compiling C++Builder 2010 Applications With Debug Information
Supported VCL and CLX Controls
Developer Express ExpressNavBar Support
Developer Express QuantumGrid Support
Developer Express ExpressQuantumTreeList Support
Developer Express ExpressVerticalGrid Support

Highlight search results