Compiler Settings for Borland C++Builder 6.0

Applies to AQTime 8.81, last modified on January 18, 2022

This topic explains how to prepare applications created with Borland C++Builder 6.0 for AQTime. To learn how to prepare applications created with other C++Builder versions, see Compiler Settings for Native Applications.

To prepare a Borland C++Builder application for AQTime, you must first ensure that it includes debug info. Follow these steps:

  1. Open your project in Borland C++Builder.

  2. To set the compiler options, choose Project > Options from C++Builder's main menu and select the Compiler tabbed page.

  3. To include symbolic debug information, in the Debugging section of the Compiler page, check Debug information. In addition, to refer this information to source line numbers, check Line Information.

    Project Options: Compiler
  4. To set the linker options, select the Linker tabbed page. In the Linking options group, check Create Debug Information.

  5. If you want to profile VCL classes, for example, TDataset, check the Use debug libraries box. Otherwise, AQTime will be able to profile only the classes that are defined in your application.

    Project Options: Linker
  6. If you compile your application with CodeGuard enabled, the latter will report errors during the profiler execution. They relate to AQTime hooking code and are not actually errors. We recommended that you disable CodeGuard before profiling your application with AQTime. To do this:

    1. Select Tools > CodeGuard Configuration from C++Builder's main menu. This will open the CodeGuard Configuration dialog.

    2. Uncheck the Enable box on the Preferences tabbed page of this dialog:

      CodeGuard Configuration
    3. Click OK to save the changes.

  7. Now, if you do not want to use the Allocation profiler, go to point 8.

    The point of the Allocation profiler is not performance. Its point is to track memory usage. If you need to have your application support the Allocation profiler, you must make sure that AQTime has access to the VCL binary code. The easiest way to add support for the Allocation profiler is to check Use debug libraries on the Linker page, uncheck Use dynamic RTL on that page, and then uncheck Build with runtime packages on the Packages page:

    Compiler settings for Allocation profiler
    Tip: You can actually leave the Use dynamic RTL checked, but in this case the memory would be allocated via the Borland C++ Multi-thread Runtime Library (cc3260mt.dll) and since this module is not included in the Setup panel, all found leaks would not be displayed, if the View project classes only option is enabled. This option is enabled by default and the results of the Allocation profiler would not be shown until the option is disabled, which could be rather confusing.
    If you want to keep the Build with runtime packages enabled (for instance, to control the exe size), you can still use the Allocation profiler. When you include your application in an AQTime project, also include the <Windows>\System32\VCLnn.BPL or <Windows>\System32\RTLnn.BPL file, where nn is the compiler version number, for instance, RTL60.BPL. You can find this number in the edit field under the "Build with runtime packages" check box:
    Finding out the compiler version number

    To add a module to an AQTime project, press Add Module button on the Setup toolbar or select it from the Setup context menu.

  8. Once you have set the compiler and linker options correctly, rebuild your application and it will be ready for profiling. If you are profiling an ActiveX control or a COM server however, you should register its “debug” version in the system (See Profiling COM Applications).

When your application is ready for release, remember to recompile it without debug information to reduce the application size.

Note: AQTime is incompatible with some third-party tools that modify the binary code of your application (for example, those that add a custom exception handling mechanism). An example of such a tool is EurekaLog. We recommend that you profile your application before processing it with such tools.

See Also

Compiler Settings for Native Applications
Adding the AQTime Menu Item to Borland Delphi and C++Builder IDE

Highlight search results