包含用括号括起来的文件名Including Bracketed Filenames

ANSI 3.8.2 查找可包含源文件的方法ANSI 3.8.2 The method for locating includable source files

对于用尖括号括起的文件规范,预处理器不会搜索父文件的目录。For file specifications enclosed in angle brackets, the preprocessor does not search directories of the parent files. “父级”文件是其中包含 #include 指令的文件。A "parent" file is the file that has the #include directive in it. 相反,它首先会通过 /I 后面的编译器命令行上指定的目录中搜索文件。Instead, it begins by searching for the file in the directories specified on the compiler command line following /I. 如果 /I 选项不存在或失败,预处理器会使用 INCLUDE 环境变量在尖括号中查找包含文件。If the /I option is not present or fails, the preprocessor uses the INCLUDE environment variable to find any include files within angle brackets. INCLUDE 环境变量可以包含使用分号 (;) 分隔的多个路径。The INCLUDE environment variable can contain multiple paths separated by semicolons (;). 如果多个目录显示为 /I 选项的一部分或在 INCLUDE 环境变量中,预处理器会按它们的出现顺序搜索它们。If more than one directory appears as part of the /I option or within the INCLUDE environment variable, the preprocessor searches them in the order in which they appear.

另请参阅See Also

预处理指令Preprocessing Directives