-I: Include File Path

Group

INPUT

Scope

Compilation Unit

Syntax
  -I<path> 
  
Arguments

<path>: path, terminated by a space or end-of-line

Default

None

Defines

None

Pragmas

None

Description

Allows you to set include paths in addition to the LIBPATH, LIBRARYPATH, and GENPATH environment variables (refer LIBRARYPATH: `include <File>' Path and GENPATH: #include "File" Path). Paths specified with this option have precedence over includes in the current directory, and over paths specified in GENPATH, LIBPATH, and LIBRARYPATH.

Example
  -I. -I..\h -I\src\include 
  

This directs the Compiler to search for header files first in the current directory ( . ), then relative from the current directory in '..\h', and then in '\src\include'. If the file is not found, the search continues with GENPATH, LIBPATH and LIBRARYPATH for header files in double quotes ( #include"headerfile.h"), and with LIBPATH and LIBRARYPATH for header files in angular brackets ( #include <stdio.h>).

See also

Input Files

-AddIncl: Additional Include File

LIBRARYPATH: `include <File>' Path

GENPATH: #include "File" Path