By default, the compiler searches for the standard include files in the directories specified in the CPATH, C_INCLUDE_PATH, and CPLUS_INCLUDE_PATH environment variables. 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:
Use the -X option to prevent the compiler from searching the default path specified by the environment variables.
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:
prompt>icpc -X -I/alt/include source.cpp