If two compilation units, A and B, reference the same instantiation,
the
-qtemplateregistry compiler option has the
following effect:
- If you compile A first, the object file for A contains the code
for the instantiation.
- When you later compile B, the object file for B does not contain
the code for the instantiation because object A already does.
- If you later change A so that it no longer references this instantiation,
the reference in object B would produce an unresolved symbol error.
When you recompile A, the compiler detects this problem and handles
it as follows:
- If the -qtemplaterecompile compiler option
is in effect, the compiler automatically recompiles B during the link
step, using the same compiler options that were specified for A. (Note,
however, that if you use separate compilation and linkage steps, you
need to include the compilation options in the link step to ensure
the correct compilation of B.)
- If the -qnotemplaterecompile compiler option
is in effect, the compiler issues a warning and you must manually
recompile B.