title | description | ms.assetid | keywords | topic_type | api_name | api_type | ms.topic | ms.date | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
/I switch |
The /I switch specifies directories to be searched for imported IDL files, included header files, and ACF files. |
cdb0a1c2-ff99-4060-be72-a54dd20dbf93 |
|
|
|
|
reference |
05/31/2018 |
The /I switch specifies directories to be searched for imported IDL files, included header files, and ACF files.
midl /I include_path
-
include_path
-
Specifies one or more directories that contain import, include, and ACF files. White space between the /I switch and include_path is optional. Separate multiple directories with a semicolon character (;).
More than one directory can appear with each /I switch, and more than one /I switch can appear with each MIDL compiler invocation. Directories are searched in the order they are specified.
The /I switch setting is also passed by the MIDL compiler to the C compiler's C preprocessor. When the /cpp_cmd switch is present and the /cpp_opt switch is not, the MIDL compiler concatenates the string specified by the /cpp_cmd switch with the /I, /D, and /U options and uses this concatenated string to invoke the C preprocessor for each IDL and ACF source file. The MIDL compiler switch /I is not passed to the preprocessor when the MIDL compiler switch /no_cpp or /cpp_opt is specified.
In Microsoft operating-system environments (64-bit Windows, 32-bit Windows, 16-bit Windows, and MS-DOS), directories are searched in the following sequence:
- Current directory
- Directories specified by the /I switch (in the order they follow the switch)
- Directories specified by the INCLUDE environment variable
When directories are specified with the /I switch, the /no_def_idir switch instructs the MIDL compiler to ignore the current directory, ignore the directories specified by the INCLUDE environment variable, and search only the specified directories.
When no directories are specified with the /I switch, the /no_def_idir switch instructs the MIDL compiler to search only the current directory.
midl /I c:\include;c:\include\h /I\include2 filename.idl