2.3.4. Specifying search paths

These options enable you to specify the directories to search for included files:

Include file options

The precise search path varies according to the combination of options you select, 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:

--preinclude filename

Includes the source code of the specified file at the beginning of the compilation. This can be used to establish standard macro definitions, for example. The filename is searched for in the directories on the include search list.

-I, directory

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

See Included files for complete details on how the compiler handles include files.

-fk

Ensures that Kernighan and Ritchie search rules are used 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.

-fd

Ensures that the handling of quoted include files is performed the same as for angle-bracketed include files. Specifically, the current place is excluded from the search path.

-Jdirectory

Adds the specified directory, or comma-separated list of directories, to the end of the search path after all the directories specified by the -I options.

See Included files for complete details on how the compiler handles include files.

Copyright © 2003, 2004 ARM Limited. All rights reserved.ARM DUI 0232B
Non-Confidential