The binder takes the name of an ALI file as its argument and needs to locate source files as well as other ALI files to verify object consistency.
For source files, it follows exactly the same search rules as
(see Search Paths and the Run-Time Library (RTL)). For ALI files the
directories searched are:
-Iswitches on the
gnatbindcommand line, in the order given.
ADA_OBJECTS_PATHenvironment variable. Construct this value exactly as the
PATHenvironment variable: a list of directory names separated by colons (semicolons when working with the NT version of GNAT).
-nostdlibis specified. Installing an Ada Library
In the binder the switch
is used to specify both source and
library file paths. Use
instead if you want to specify
source paths only, and
if you want to specify library paths
only. This means that for the binder
-Idir is equivalent to
The binder generates the bind file (a C language source file) in the
current working directory.
Interfaces and their
children make up the GNAT Run-Time Library, together with the package
GNAT and its children, which contain a set of useful additional
library functions provided by GNAT. The sources for these units are
needed by the compiler and are kept together in one directory. The ALI
files and object files generated by compiling the RTL are needed by the
binder and the linker and are kept together in one directory, typically
different from the directory containing the sources. In a normal
installation, you need not specify these directory names when compiling
or binding. Either the environment variables or the built-in defaults
cause these files to be found.
Besides simplifying access to the RTL, a major use of search paths is in compiling sources from multiple directories. This can make development environments much more flexible.