IBM® Rational® PurifyPlus™ for Windows works best with programs that are built with certain compiler and linker settings. If you run into problems using PurifyPlus one of the first steps you should take is to determine if you are using the right settings. If you aren't you should correct these settings and then rebuild your program. This script was written to assist you in performing these steps for programs built with Visual Studio 6. There is a separate script for programs built with Visual Studio .NET, Visual Studio .NET 2003, Visual Studio 2005 and Visual Studio 2008.
For more information on the recommended settings please refer to the product's online help, which is available from the product's Help menu. Once the online help is opened, you should view the "Recommended Settings for Visual Studio 6" topic.
This script can be used to report settings that need to be changed. You can then make these changes yourself via the Visual Studio IDE, or you can optionally tell the script to change those settings and write them to your project files.
Defaults are provided for all values except for either the workspace file or the project file. It is required to enter one of these.
Here is the syntax.
v1.04 Usage: perl ScanVC6ForPurifyPlus.pl [<options>] Options: -dsw=<workspace-file> ==> specify a workspace file to check or modify You must specify a workspace file or a project file -dsp=<project-file> ==> specify the project file to check or modify -config=<Configuration | all> config=Configuration ===> only scan the specified configuration config=all (default) ==> scan all configurations -report=<output file> Specify the output file (default)=output to console -write=<yes> Modify settings and write. It is recommended that you backup the projects before modifying. write=yes ==> modify settings and write project file(s) after saving current project file(s) to.backup. write=no (default)==> report incorrect settings only, don't modify anything. e.g. perl ScanVC6ForPurifyPlus.pl -dsw="C:\My Apps\MyCode.dsw" -report=scan.log -write=yes or perl ScanVC6ForPurifyPlus.pl -dsp=C:\MyApps\MyCode.dsp -report=scan.log -write=yes
You can check an entire workspace, or focus on a project or configuration or a combination of the two. For example:
Check an entire workspace, all projects and all configurations: perl ScanVC6ForPurifyPlus.pl -dsw=C:\MyApps\MyCode.dsw Check just one project, all configurations: perl ScanVC6ForPurifyPlus.pl -dsp=C:\MyApps\MyProject.dsp Check just one project and one configuration for that project: perl ScanVC6ForPurifyPlus.pl -dsp=C:\MyApps\MyProject.dsp -config=DebugThe script tries to limit it's checks to configurations that we target. Thus the script checks only those configurations that are targeted for the Win32 platform. It also doesn't check unknown project types. The output will list all the projects and configurations that are found, and report what isn't being checked as well as what is being checked.
The script generates a report that lists the files that it checked and the values that weren't set to the recommended values and what the recommended values should be. You can go and manually change these settings in the Visual Studio IDE and run the script again after saving these changes to verify you've made the changes correctly.
If you desire, you can optionally have the script automatically correct the settings and write the files to disk. Follow these instructions before doing this, for safety's sake:
Note that if you rerun the script telling it to write again, we won't create new