Compiler Settings for Microsoft Visual C++ 6.0

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

This topic explains how to prepare applications that were created with Microsoft Visual C++ 6.0 or earlier for AQTime. To learn how to prepare applications created with other compilers, see the topics below:

To prepare a Visual C++ application for AQTime, you must ensure that it includes debug info and select the format under which it will be generated. Follow these steps:

  1. Open your project in Visual Studio.

  2. To prevent the changes from affecting your release-version configuration, do the following: Choose Build > Set Active Configuration from Visual C++'s menu and select another configuration, say Debug, as the active configuration for the project. All of the changes that are made in the compiler options will be stored to this configuration and will leave the Release configuration unaffected. Usually the Debug configuration is similar to this: <Your_Project_Name> - Win32 Debug:

    Set Active Project Configuration Dialog

    Note that the only reason to change the active configuration is to leave the Release configuration unaffected. If you want to profile the Release configuration, you may skip this step. In this case, do not forget to restore the compiler settings before compiling the release version of your application.

  3. Now, open the Project Settings dialog (press Alt-F7 or use Project > Settings) and select the configuration you have set.

  4. In the dialog, open the C/C++ page and make sure that Debug Info is set either to Program Database or Program Database for Edit and Continue

    Project Settings: C/C++

    For more information on these options review Microsoft Visual C++ Help.

  5. You now have set your project to generate debug information when compiling. Next, you must ensure that the linker saves it. From Project > Settings select the Link page. There, first set the Category to General. Then check Generate debug info and clear the Enable profiling check box:

    Project Settings: Link > General

    On the Link page, select Debug in the Category box and then do the following:

    • Select the Debug info check box.
    • Select the Microsoft format option button.
    • Also, it is recommended to clear the Separate type check box (disabling this setting is desired, but not required).
    Project Settings: Link > Debug
  6. The last step is to set how the linker will save the debug information. AQTime supports debug information generated as an external PDB file (PDB format). To set linker options:

    • Switch to the Link page of the Project Settings dialog:
    • Set the Category to Customize.
    • Check Use program database.
    • Enter the PDB file name you want into the Program database name edit field.
      Project Settings: Link > Customize

Once you have set the compiler and linker options as described above, rebuild your application and it will be ready for profiling. Before opening the application in AQTime, make sure that the output directory of your application includes the .pdb file you have created. In addition, this directory must contain the vcX0.pdb file, where X is the major version number of the Visual C++ compiler, e.g. for Visual C++ 6.0 this file is called vc60.pdb. vcX0.pdb holds part of your application's debugging information, which is needed to profile the entire application in AQTime correctly. If you are profiling an ActiveX control or a COM server, do not forget to register its "debug" version in the system (See Profiling COM Applications).

By default, the .pdb debug info file resides in the same folder where the profiled executable or DLL is located. When you open your module in AQTime, it searches for the debug info file in this default location. If you copy the debug info file to another location, then specify this location in the Symbols Path list of the Symbols Options dialog (this list contains the search paths). See Specifying Path to Debug Info Files for more information.

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

See Also

How AQTime Profilers Use Metadata and Debug Information
Adding the AQTime Menu Item to Visual Studio 6.0 IDE

Highlight search results