Win32 Installation

Instructions for installing the Win32 version of LCLint:

  1. Download http://lclint.cs.virginia.edu/downloads/binaries/splint-3.1.1.win32.zip.

  2. Unzip the package. This can be done using any unzip utility, such as WinZip. The zip file contains several directories.

    If you extract then to C:\splint-3.1.1 you will not need to set the environment variables. The splint binary is in bin\splint.exe.

    If you extract it to some other directory, you will need to set the envrionment variables shown below. In Windows 2000, you can set environment variables by selecting Settings -> Control Panel -> System from the Start button. On the System panel, select the Advanced tab and then the Environment Variables button. This produces a dialog box. In the User Variables box, select New... to add a new environment variable.

    Then add environment variables:

    LARCH_PATH - path to search for splint libraries and initializations files. Typically, this should be: .;<directory where you installed splint>\lib

    LCLIMPORTDIR - directory containing lcl imports files. Typically, this should be: <directory where you installed splint>\imports

    include - the pathname used to find system include files (e.g., stdio.h should be found on this path). If you have installed a compiler, it probably sets this already.

    Different versions of Windows set environment variables in different ways. If you can't figure out how to set envirnoment variables in Windows, you can instead use the flags -larchpath and -lclimportdir in your splint.rc file.

    Set up your command PATH to include the directory containing splint.exe, or move the binary to a directory on your command path.

  3. Subscribe to the Splint mailing lists by visiting http://www.splint.org/lists.html.

Microsoft Developer Studio

Running in Output Window
You can add custom tools to Developer Studio to run Splint within the IDE. Select Tools | Customize. Add a new command to the command list. In the command edit box, enter the command to run Splint (e.g., splint). In the arguments edit box, enter the command line arguments (e.g., *.c). Check the “Use Output Window” box.

Initializations

The VC++ header files use some non-standard types. Arjan van Vught suggests using this .splintrc file to solve parsing problems on those files.

Message format

You can configure Splint to produce messages that can be parsed by DevStudio by using the +parenfileformat flag. (This is set by default in the Win32 binary.) Since DevStudio wraps message text automatically, you may also wish to use -linelen 999 to set the line length high enough so lclint will not split lines.