/I[ ]directory
This option adds a directory to the list of directories searched for include files. To add more than one directory, use this option more than once. Directories are searched only until the specified include file is found.
You can use this option with the Ignore Standard Include Paths (/X) option.
The compiler searches for directories in the following order:
The following command looks for the include files requested by MAIN.c in the following order: first in the directory containing MAIN.c, then in the \INCLUDE directory, then in the \MY\INCLUDE directory, and finally in the directories assigned to the INCLUDE environment variable.
CL /I \INCLUDE /I\MY\INCLUDE MAIN.C
Compiler Options | Setting Compiler Options