Sunday, May 29, 2011

PC-Lint: Header files

Options to control the search for included files:
-i or -I
synonym options, simply specify a directory to search for incldued files
-i-
clear list of directories specified with -i options
--i
like -i but directories specified with this option are search after directories specified with -i. Normally used to specify compiler and system include directories.
+fdi
Included files are searched first in the same directory as the including file.
Beware that PC-Lint uses the INCLUDE environment variables. Say you have installed Visual Studio but are linting code for the Embedded Workbench, you might lint a mix of Windows and embOS header files. To avoid this either unset the INCLUDE environment variable or use the -incvar lint option, for example: -incvar(DONT_USE_ENVIRONMENT)

-incvar has to be given on the lint command line, not in a file.

No comments:

Post a Comment