By default, the compiler searches for the standard include files in the directories specified in the INCLUDE environment variable. You can indicate the location of include files in the configuration file.
Use the -Idirectory option to specify an additional directory in which to search for include files. For multiple search directories, multiple -Idirectory commands must be used. Included files are brought into the program with a #include preprocessor directive. The compiler searches directories for include files in the following order:
directory of the source file that contains the include
directories specified by the -I option
directories specified in the INCLUDE environment variable
Use the -X option to prevent the compiler from searching the default path specified by the INCLUDE environment variable.
You can use the -X option with the -I option to prevent the compiler from searching the default path for include files and direct it to use an alternate path.
For example, to direct the compiler to search the path /alt/include instead of the default path, do the following:
IA-32 systems: prompt>icc -X -I/alt/include newmain.cpp
Itanium(TM)-based systems: prompt>ecc -X -I/alt/include newmain.cpp