Preparing TMS Software VCL Components for C++Builder Applications

Applies to TestLeft 15.40, last modified on March 17, 2022

If you have TMS Software VCL controls in your C++Builder application, we recommend that you recompile the TMS controls with full debug information before including them in your application. This way TestLeft will be able to access the control properties and methods during the test run.

Note: To re-compile the controls with full debug information, you need a TMS Software controls package that contains the source files of the controls.
  1. Create a new directory for the debug version of the TMS Software VCL controls which you are going to re-compile.

    For simplicity, we will consider re-compiling only the TMS AdvStringGrid control. You can re-compile other TMS Software VCL controls with debug information in the same way.

    For instance, create the <RAD Studio Projects>\AdvStringGrid_Debug directory for the debug version of the AdvStringGrid control.

  2. Copy all of the .pas source files from your TMS Software VCL controls package to the directory for the debug version of controls (the <RAD Studio Projects>\AdvStringGrid_Debug directory), created in the previous step.

    Note: Copy all .pas files to a common directory. There can be files with identical file names. Replace equally named files while copying.
  3. Run your C++Builder and create a new package project (select File | New | Package from the main menu).

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

  5. Right-click the Contains directory in the project tree that the Project Manager panel shows and then click Add.

  6. In the Add dialog, click the Browse button on the Add Unit tab.

    In the Unit file name dialog, choose the .pas source files that implement the controls to recompile. In our case, for the AdvStringGrid control, choose the advgrid.pas and asgreg.pas files that have been copied to the <RAD Studio Projects>\AdvStringGrid_Debug directory.

    To compile other controls, specify the appropriate .pas source files. Click Open in the Unit file name dialog and click OK in the Add dialog.

  7. Configure the project to compile the controls with full debug information:

    • Select Project | Options from the main menu.

    • In the resulting Project Options dialog, switch to the C++ Compiler | Debugging category and enable the Debug information and Debug line number information options in the Debugging group:

    • Switch to the C++ Compiler | Optimizations category and select None in the Optimizations group:

    • Switch to the Linker | Linking category and enable the Full debug information option:

    • Switch to the Delphi Compiler | Compiling category. In the Debugging group, enable the Debug information and Local debug symbols options.

      In the Code generation group, enable the Generate stack frames option and disable the Optimization option:

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

  8. Select Project | Build Project_Name from the main menu to build the project.

    During the compilation, C++Builder may require .res, .dfm and other files from the TMS Software components package 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 directory, where your TMS Software controls package containing the source files resides. Copy the files to the <RAD Studio Projects>\AdvStringGrid_Debug directory (the directory containing the debug version of the control).

    Try to build the project again.

    Repeat the step until the project is built successfully.

  9. After you build the project, install the compiled debug version of the TMS Software VCL component to integrate it into C++Builder. Right-click the project node in Project Manager and then click Install.

    Now, the debug version of the control is integrated into C++Builder and you can use it in your C++Builder applications.

Repeat the steps to recompile the other TMS Software VCL components with full debug information.

As you have re-compiled TMS Software VCL controls with full debug information and registered them in your C++Builder, you can use these controls in your C++Builder applications. TestLeft will be able to access TMS Software VCL controls, their properties and methods.

Besides compiling your C++Builder application with debug information, re-compile TMS Software VCL controls with debug information as well. Before compiling your project, set the project options as it is described above in step 7.

When you try to compile your C++Builder application by using the re-compiled debug version of TMS Software VCL controls, C++Builder may require some additional source files, and this can cause errors during the compilation. Find the required files in the directory that contains the re-compiled debug version of TMS Software VCL controls (in our case, these controls reside in the <RAD Studio Projects>\AdvStringGrid_Debug directory). Copy the files to your application project’s directory.

Try to compile the application again.

Repeat this operation until your application is compiled successfully.

Highlight search results