Next: Object files
Up: Compiler usage
Previous: File searching
If you include files in your source with the {$I filename}
directive, the compiler will look for it in the following places:
- It will look in the path specified in the incude file name.
- It will look in the directory where the current source file is.
- it will look in all directories specified in the include file search
path.
You can add files to the include file search
path with the -I (See 5.1)
option.
As an example, consider the following include statement in a file
units/foo.pp:
{$i ../bar.inc}
Then the following command :
ppc386 -Iincfiles units/foo.pp
will cause the compiler to look in the following directories for
bar.inc:
- the parent directory of the current directory
- the units subdirectory of the current directory
- the incfiles directory of the current directory.
Michael Van Canneyt
Thu Sep 10 13:56:17 CEST 1998