Notes on PC-lint

A few notes about Gimpel PC-lint


Running PC-lint with GCC under Cygwin

I had reasonable success using PC-lint under Cygwin 1.5.x with GCC 3.3.1. Here are some configuration files to make it work.

In directory "C:\lint":


Use with "make"

The following scheme works reasonably well. Put project specific options in the file my_project.lnt. Each ".cpp" produces a ".lob" ("lint object") (-u: unit checking, -zero: return zero as error code, -oo: produce a "lob" file). All ".lob" files can be process together to cross check the modules.

LINT = C:\\lint\\lint-nt -iC:\\lint std.lnt
LINTFLAGS = my_project.lnt
MODFLAGS = -u -zero -oo\($@\)

OBJECTS = xxx.lob

project: $(OBJECTS)
        $(LINT) $(LINTFLAGS) $(OBJECTS)

xxx.lob: xxx.cpp
        $(LINT) $(LINTFLAGS) $(MODFLAGS) xxx.cpp

Alternatively, the project can processed in one go by providing all source files to the command line. It scales surprisingly well.


Sorting the messages

This simple script provides a sorted list of messages.


PC-lint with wine on linux

Until Gimpel software fixes this, do be aware that PC-lint runs just fine on Linux as a regular console application and works just fine on G++ code.

LINT-NT.EXE only imports 57 symbols from KERNEL32.DLL, all of which are flawlessly implemented in Wine. There is no performance difference when running it this way.

Simply install Wine (http://www.winehq.com/), then just type:

$wine lint-nt.exe [parameters]

Or, if you add the appropriate line to "/proc/sys/fs/binfmt_misc/register", you can just type:

$lint-nt.exe [parameters]

For more details on running Win32 console apps under Linux with Wine, see:

http://www.winehq.com/site/docs/wine-user/cui-programs

See /usr/src/linux/Documentation/binfmt_misc.txt for more info about binfmt_misc.


$Id: PC-lint.html,v 1.6 2004/07/28 15:24:15 arnaud Exp $ | Valid XHTML and CSS

Maintained by Arnaud Desitter.
© Arnaud Desitter 2004