2.3.4. Specifying search paths

The following options specify the directories that are searched for included files.

The precise search path varies according to the combination of options selected and whether the include file is enclosed in angle brackets or double quotes. See Included files for full details of how these options work together.

-I, dir-name

This option adds the specified directory (or comma-separated list of directories) to the list of places that are searched for included files. If you specify more than one directory, the directories are searched in the same order as the -I options specifying them.

The ARM compilers use an in-memory file system to speed processing of include header files. The in-memory file system is specified by -I-.


This option uses Kernighan and Ritchie search rules for locating included files. The current place is defined by the original source file and is not stacked. See The current place for more information. If you do not use this option, Berkeley-style searching is used.


This option makes the handling of quoted include files the same as angle-bracketed include files. Specifically, the current place is excluded from the search path.


This option adds the specified comma-separated list of directories to the end of the search path after all the directories specified by the -I options. Use -j- to search the in-memory file system.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D