Skip to content

How do I tell PC-lint Plus where to find my compiler headers?

Use the -i option or the INCLUDE environment variable to designate a search path for files not found in the current directory.

You may specify multiple search directories using the -i option multiple times.  There should be no space between the -i option and the name of the directory, the terminating directory separator is optional.  Directories are searched in the order in which they are specified.  For example, to look for header files in /usr/local/include and then in /usr/include, you could use:

-i/usr/local/include -i/usr/include

Alternatively, you can set the INCLUDE environment variable to a semi-colon separated (Windows) or colon-separated (Unix) list of directories.  For example:

On DOS/Windows:
set INCLUDE=/usr/local/include;/usr/include

On UNIX/LINUX:
export INCLUDE=/usr/local/include:/usr/include

You can specify an alternate environment variable name using the -incvar option.

If the +fim flag option is set (it is by default), you can specify multiple directories with one -i option in the same way as described above with the INCLUDE variable.  For example:

-i/usr/local/include;/usr/include

The --i option is identical to the -i option with the exception that the directories specified with this option are searched only after all of the directories specified with the -i option.

See Section 5.7 of the Reference Manual for the -i--i, and -invcar options, and Section 15.2.1 for the INCLUDE environment variable.

Feedback and Knowledge Base