The implicit inclusion of source files is a method of finding definitions of template entities. This method is enabled for the compiler by default (see also the option IMPLICIT-INCLUDE on "MODIFY-SOURCE-PROPERTIES") and can be disabled with IMPLICIT-INCLUDE=*NO. When disabling implicit inclusion please check the notes in section "Fundamentals".
When implicit inclusion is enabled, the compiler looks for the definition of a template entity in accordance with the following principle:
If a template entity is declared in a header file named basename.H
and no definition for it is available in the compiled source code, the compiler will assume that the definition for that template entity is contained in a source file
which is located as a source program element in the same PLAM library as the header file and
which has the same base name as the header file and a standard suffix that is valid for C++ source files, i.e.:
.C
,.CPP
,.CXX
or.CC
(e.g. basename.CC
).
Let us assume, for example, that a template entity ABC::f
is declared in the header file XYZ.H
in the library PLAM.T
. If the instantiation of ABC::f
is requested on compilation, but no definition of ABC::f
exists in the compiled source code, the compiler will search the library PLAM.T
for a source file with the base name XYZ
and a standard suffix that applies to C++ source files, i.e.: .C
, .CPP
, .CXX
or .CC
(e.g. XYZ.CC
). If such a file exists, it will be treated as if it were included at the end of the source file.