View Single Post
  #3  
Old 11-18-2003, 12:06 PM
Mike-7 Mike-7 is online now
Registered User
 
Join Date: 06-13-2003
Location: St-Petersburg, Russia
Posts: 10
Send a message via ICQ to Mike-7
RE: Bounds Checker

This requires developers to create separate project configuration in EACH *.dsp and support all project settings as they change (e.g. when optimization level (/O) needs to be changed then all configurations have to be reset accordingly). Supporting multiple configurations is very boring and error-prone.

I meant special support for BC, see below:

----- extract from Numega documentation -------------->>>>
Running FinalCheck from the Command Line



You can prepare your program for FinalCheck(tm) using NMAKE and the following BoundsChecker components. The instrumentation process substitutes the NMCL compiler driver for the standard Visual C++ compiler driver.



NMCL.EXE BoundsChecker compiler driver.

Used in place of CL.EXE.

NMLINK.EXE BoundsChecker linker driver.

BCINTERF.LIB BoundsChecker library file required by all instrumented programs.

To run FinalCheck from the command line using a standard Microsoft makefile



1 Specify CPP=NMCL.EXE on the NMAKE command line. For example, assuming that your path statement includes NMCL and NMLINK, the command is:


NMAKE CPP=NMCL.EXE LINK32=NMLINK.EXE


If your makefile uses a name other than MAKEFILE, use the following command syntax:

NMAKE /f filename.MAK CPP=NMCL.EXE LINK32=NMLINK.EXE


Note: If your path statement does not include NMCL and NMLINK, you must specify the full directory path to these programs (located in your BoundsChecker installation directory).




2 Add a target to the makefile that corresponds to the BoundsChecker Project Configuration you created in the Developer Studio IDE. (This step is optional, but recommended.)




To run FinalCheck using a Win32 SDK makefile

If your makefile is based on the original Win32 SDK, the substitution line is slightly different, and you must add it after the line that includes the NTWIN32.MAK file:


!include <ntwin32.mak>

CC=NMCL.EXE

LINK=NMLINK.EXE





To apply NMCL command-line options to a project



Specify NMCL and the appropriate option in quotes. For example:


NMAKE /f TEST.MAK CPP="NMCL /NMopt:TEST.INI"



See the BoundsChecker Basics manual for a description of available NMCL and NMLINK options, or use NMCL /? or NMLINK /?.



To specify NMCL command-line options with an environment variable

You can also specify NMCL command-line options using the NMCL environment variable. You may want to do this for "global" options. For example, the following instructs NMCL to not instrument the specified source file:



set NMCL=/NMignore:StdAfx.cpp



See the BoundsChecker Basics manual for a description of available NMCL and NMLINK options, or use NMCL /? or NMLINK /?.







Copyright © 1997-1998 Compuware Corporation
--------------- cut here ------------------------------>
Reply With Quote