Compiler Settings for Borland C++Builder 2006

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

This topic explains how to prepare applications created with Borland C++Builder 2006 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 2006 application for AQTime, you must first ensure that it includes debug info. Follow these steps:

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

  2. Select Project > Options from the main menu. This will open the Project Options dialog.

  3. To set the C++ compiler options, select the C++ Compiler (bcc32) > Debugging category from the tree view on the left of the dialog.

  4. To include symbolic debug information, check Source debugging. In addition, to refer this information to source line numbers, check Debug line numbers.

    Project Options: C++ Compiler (bcc32) > Debugging

    Click the image to enlarge it.

  5. (Optional) To generate stack frames when using the C++ compiler, switch to the C++ Compiler (bcc32) > Compiling category and check Stack frames.

    Project Options: C++ Compiler (bcc32) > Compiling

    Click the image to enlarge it.

  6. If you compile your application with CodeGuard enabled, the latter will report errors during the profiler execution. They relate to AQTime hooking code that are not actually errors. We recommend that you disable CodeGuard before profiling your application with AQTime. To do this, switch to the C++ Compiler (bcc32) > CodeGuard compile support category and uncheck All CodeGuard options on.

    Project Options: C++ Compiler (bcc32) > CodeGuard compile support

    Click the image to enlarge it.

  7. To set the Pascal compiler options, select the Pascal Compiler (DCC32) > Debugging category from the tree view on the left of the dialog.

  8. To include symbolic debug information, check Debug information. In addition, to refer this information to source line numbers, check Local symbol information.

    Project Options: Pascal Compiler (DCC32) > Debugging

    Click the image to enlarge it.

  9. (Optional) To generate stack frames when using the Pascal compiler, switch to the Pascal Compiler (DCC32) > Code generation category and check Generate stack frames.

    Project Options: Pascal Compiler (DCC32) > Code generation

    Click the image to enlarge it.

  10. To set the linker options, switch to the Linker (ilink32) > Linking category and check Full debug information.

    Project Options: Linker (ilink32) > Linking

    Click the image to enlarge it.

  11. Now, if you do not want to use the Allocation profiler, skip this step.

    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 uncheck Use dynamic RTL (cc3260.dll) in the Linker (ilink32) > Linking category and then uncheck Build with runtime packages in the Packages category:

    Project Options: Packages

    Click the image to enlarge it.

    If you want to keep the Build with runtime packages option (for instance, to control the exe size), you can still use the Allocation profiler. When you include your application in an AQTime project, you will also have to include the <Windows>\System32\RTL100.BPL file.

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

  12. 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

Highlight search results