RAD Studio
ContentsIndex
PreviousUpNext
Using CodeGuard

This procedure describes how to use CodeGuard when debugging a C++ application.

To run a C++ application with CodeGuard reporting
  1. Enable the CodeGuard reporting tool.
  2. Enable CodeGuard compiler options for your project.
  3. Choose RunRun to run your application.

During the execution of your application, CodeGuard runtime errors appear in the Message view. 

CodeGuard also generates an error log named <project_name>.cgl that lists any errors it finds. The error log is located in the same directory as your executable.

Note: If you suspect that your program accesses a freed memory block but CodeGuard does not report an error, increase the value of Maximum memory block size
or Delay queue length on the Resource Options page of the Configure CodeGuard dialog box.

To enable the CodeGuard reporting tool
  1. Choose ToolsCodeGuard Configuration to display the CodeGuard Configuration dialog box.
  2. Verify that CodeGuard is enabled.
  3. Click OK.

Note: If you change any CodeGuard settings in the CodeGuard Configuration
dialog box, CodeGuard generates a .cgi configuration file with the same name and directory as your project file.

To enable CodeGuard compiler options for your project
  1. Choose ProjectOptionsC++ CompilerDebugging to display the CodeGuard compiler options.
  2. Check Enable all CodeGuard options to enable full CodeGuard coverage.
  3. Click OK.
  4. Rebuild your project.

Note: If you compile and link your project in separate steps, remember to include the CodeGuard library (cg32.lib
) before including other libraries.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!