In a typical installation, configuring Visual Lint to use PC-lint involves defining the contents of two configuration files - conventionally std.lnt and options.lnt. These files determine which compiler and library options will be used during analysis, and their contents are very important if the analysis is to be accurate and error-free. Although a full discussion of the options which these files may contain is beyond the scope of this guide, details can be found in the PC-lint manual.
If however you are setting up Visual Lint for use with PC-lint for the first time, you might find it useful to take a look at the PC-lint configuration files we use ourselves.
The following zipfile contains std.lnt files for various supported IDEs, as well as the options.lnt file which defines our own warning policy:
The Configuration Wizard can be invoked from the Configuration Wizard command on the Visual Lint toolbar. When run, it will guide you through the process of configuring Visual Lint for use with supported analysis tools:
The Analysis Tools page allows you to select which analysis tool to configure:
The first thing the Configuration Wizard needs to do is to locate your PC-lint installation folder.
If PC-lint has been installed using its installation wizard, Visual Lint will be able to discover the location of this folder from the registry key HKEY_LOCAL_MACHINE\Software\PC-lint\CONFIG\Version 9.0 (PC-lint 9.0) or HKEY_LOCAL_MACHINE\Software\PC-lint\CONFIG\Version 8.0 (PC-lint 8.0).
If these keys are not present or the installation has subsequently been moved you will need to enter the location of your PC-lint installation manually in the Analysis Tool Installation Folder page:
Once set, this path is recorded in the registry for subsequent use.
Once the location of your PC-lint installation has been defined, the PC-lint Analysis Configuration File and PC-lint Warning Policy File pages will allow you to to choose whether to create new std.lnt and options.lnt indirect files or use existing ones. In the former case, the wizard will guide you through the process of creating both files; in the latter the wizard will allow you to edit their contents:
If a new std.lnt file is being generated, the PC-lint Compiler Configuration, PC-lint Library Configuration, PC-lint Author Recommendations and PC-lint Warning Level pages allow you to define the contents of the indirect file using a straightforward interface. Where possible, appropriate default options will be offered for each supported environment:
The main aim of these pages is to configure which indirect (.lnt) files should be used within the PC-lint analysis configuration defined in std.lnt. Where possible, appropriate project type dependent defaults will be offered. See std.lnt for an example of a complete std.lnt indirect file.
By default only those indirect files available in the PC-lint installation folder or supplied with Visual Lint will be shown. You can download additional indirect files from the PC-lint patch pages provided by Gimpel Software at:
In Visual Lint 3.0 onwards, details of the development environment's global include folders for the need not be included in std.lnt as they are automatically written to a generated .lnt file for each project.
Finally, the Preview page shows a preview of the text which will be written to both configuration files. In both cases, you can edit the text further here before proceeding:
Once you are satisfied with the changes Visual Lint will make to the PC-lint configuration files, proceeding through the Completion page will write the new indirect files to disk, whereafter they will be available for analysis purposes.
It should be noted that the Configuration Wizard is not the only way to configure Visual Lint, as it is also possible to configure it manually via the Visual Lint Options command on the toolbar or (where available) the "Tools" menu.