Search Paths for Included Source Files (AIX)

Included sources are C and C++ source files that are included in a build because they are listed in #include preprocessor directives in other source files. If a file is named as a primary source in your configuration file, as well as being included with a preprocessor directive, VisualAge C++ treats it as a primary source and not as an included source.

The search rules be depend on whether the included files are system or user included files.

Searches For System Included Files
For all system included files, VisualAge C++ searches in the following order:

  1. The path or paths specified with incl(searchPath, path) are searched first.
  2. If you build from C++ sources the directory usr/vacpp/include is searched next.
  3. The directory /usr/include is searched last.

The last directories are searched only if you build with the default setting of incl(standardInclude). You can set incl(standardinclude, no) to search only the path specified with incl(searchPath, path).

Searches for User Included Files
For user included files, the search path includes the directory in which the file that contains the #include directive resides.

For C, the file containing the #include directive refers to the primary source that directly or indirectly includes other files.
For C++, the file containing the #include directive refers to the primary source that directly or indirectly includes other files only when you build the default setting of incl(userStrategy, primary).
When you build with incl(userStrategy, including), the file containing the #include directive is any C++ source file that directly includes other C++ sources. It may be an included file rather than a primary file, and may be in a different directory from the primary file that included it.

VisualAge C++ follows order when you build with the default setting of incl(searchPathFirst, no)

  1. The directory that contains the source file with the #include directive is searched first.
  2. The path or paths specified with incl(searchPath, path) is searched next.
  3. If you build from C++ sources with the default setting of incl(standardInclude), the directory usr/vacpp/include is searched next.
  4. If you build with the default setting of incl(standardInclude), the directory /usr/include is searched last.

VisualAge C++ follows the order below when you build with incl(searchPathFirst, yes):

  1. The path or paths specified with incl(searchPath, path) is searched first.
  2. The directory that contains the source file with the #include directive is searched next.
  3. If you build from C++ sources with the default setting of incl(standardInclude), the directory usr/vacpp/include is searched next.
  4. If you build with the default setting of incl(standardInclude), the directory /usr/include is searched last.


Incremental C++ Build
C Compilation
C++ Source Files and Source Regions
Search Paths for Primary Source Files
Linker Searches


Add or Change Source Files
Set Build Options
Build


Miscellaneous Build Options