Name an Alternate Library Directory (--search_path Option)

The --search_path option names an alternate directory that contains input files. The --search_path option's short form is -I. The syntax for this option is:

--search_path=pathname

The pathname names a directory that contains input files.

When the linker is searching for input files named with the --library option, it searches through directories named with --search_path first. Each --search_path option specifies only one directory, but you can have several --search_path options per invocation. When you use the --search_path option to name an alternate directory, it must precede any --library option used on the command line or in a command file.

For example, assume that there are two archive libraries called r.lib and lib2.lib that reside in ld and ld2 directories. The table below shows the directories that r.lib and lib2.lib reside in, how to set environment variable, and how to use both libraries during a link. Select the row for your operating system:

Operating System Enter
UNIX (Bourne shell) armcl --run_linker f1.obj f2.obj --search_path=/ld --search_path=/ld2
--library=r.lib --library=lib2.lib
Windows armcl --run_linker f1.obj f2.obj --search_path=\ld --search_path=\ld2
--library=r.lib --library=lib2.lib