Aliases: | MODIFY-INCLUDE-SEARCH |
This statement specifies which include (or header) libraries and file directories are to be searched by the compiler. It also defines the order in which these libraries and directories are searched.
MODIFY-INCLUDE-LIBRARIES | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
USER-INCLUDE-LIBRARY =
This option can be used to assign PLAM libraries or POSIX directories which contain user-defined header files (requested with #include "
..."
). Depending on the setting of the CURRENT-LIBRARY option, the library or directory containing the source or header file listed in the include directive #include "
..."
is searched first, i.e., before the libraries and directories specified with USER-INCLUDE-LIBRARY.
If the USER-INCLUDE-LIBRARY option is not specified, the following default is used:
USER-INCLUDE-LIBRARY = (*SOURCE-LIBRARY, *STANDARD-LIBRARY)
If header files are enclosed in quotes in the #include
directive (#include "
name"
), the compiler will search for these elements in the library or directory of the source program first, and then in the CRTE libraries containing the standard header files. The CRTE library $.SYSLIB.CRTE is assigned for the search in all language modes. In the language mode Cfront C++ the CRTE library $.SYSLIB.CRTE.CPP is searched prior to $.SYSLIB.CRTE. In the language modes C++ 2017 and C++ 2020 the CRTE library for modern C++ is searched prior to $.SYSLIB.CRTE. The file for that library depends on the library version. With library version 1 the file ist $.SYSLIB.CRTE.CXX01, with library version 2 it is $.SYSLIB.CRTE.CXX02.
If the option is specified, the above default is deactivated, and the compiler searches only in the libraries/directories explicitly specified. In other words, if the source program library or directory and the CRTE libraries are to be searched for header files, the *SOURCE-LIBRARY or *STANDARD-LIBRARY options must be explicitly specified.
The libraries/directories are searched in the order in which they are specified.
USER-INCLUDE-LIBRARY = *UNCHANGED
The values specified in the last MODIFY-INCLUDE-LIBRARY statement apply. If no values have been changed since starting the compiler, the default settings of the compiler (*SOURCE-LIBRARY, *STANDARD-LIBRARY) apply.
USER-INCLUDE-LIBRARY = *SOURCE-LIBRARY
The library or directory containing the source program is searched for the required header file. The *SOURCE-LIBRARY specification has no effect if the source program is in a cataloged BS2000 file or, in general, when source programs are entered via SYSDTA (see also "Notes on input via SYSDTA").
USER-INCLUDE-LIBRARY = *STANDARD-LIBRARY
The CRTE library $.SYSLIB.CRTE is assigned for the search in all language modes. In the language mode Cfront C++ the CRTE library $.SYSLIB.CRTE.CPP is searched prior to $.SYSLIB.CRTE. In the language modes C++ 2017 and C++ 2020 the CRTE library for modern C++ is searched prior to $.SYSLIB.CRTE. The file for that library depends on the library version. With library version 1 the file ist $.SYSLIB.CRTE.CXX01, with library version 2 it is $.SYSLIB.CRTE.CXX02.
USER-INCLUDE-LIBRARY = <filename 1..54>
<filename> identifies the name of the PLAM library in which the required user-defined header files are to be searched.
USER-INCLUDE-LIBRARY = <posix-pathname>
<posix-pathname> designates the name of the POSIX directory in which the required user-defined header files are to be searched. See "Compiler I/O in the POSIX file system" for a description of the term <posix-pathname>.
USER-INCLUDE-LIBRARY = *LINK(...)
LINK-NAME = <filename 1..8>
A link name can also be specified instead of a cataloged PLAM library name. <filename> designates the link name of the assigned header library. This link name must already have been assigned to the PLAM library (with the ADD-FILE-LINK command) before the compiler is called.
STD-INCLUDE-LIBRARY =
This option can be used to specify the PLAM libraries and POSIX directories which contain the required standard headers (requested with #include <
...>
).
STD-INCLUDE-LIBRARY = *UNCHANGED
The values specified in the last MODIFY-INCLUDE-LIBRARY statement apply. If no values have been changed since starting the compiler, the default settings of the compiler (*USER-INCLUDE-LIBRARY, *STANDARD-LIBRARY) apply.
STD-INCLUDE-LIBRARY = *USER-INCLUDE-LIBRARY
The search order for standard header files is derived from specifications in the USER-INCLUDE-LIBRARY option. Only the libraries/directories which are explicitly specified in that option are taken into account, not the entries for *SOURCE-LIBRARY and *STANDARD-LIBRARY.
STD-INCLUDE-LIBRARY = *STANDARD-LIBRARY
The CRTE library $.SYSLIB.CRTE is assigned for the search in all language modes. In the language mode Cfront C++ the CRTE library $.SYSLIB.CRTE.CPP is searched prior to $.SYSLIB.CRTE. In the language modes C++ 2017 and C++ 2020 the CRTE library for modern C++ is searched prior to $.SYSLIB.CRTE. The file for that library depends on the library version. With library version 1 the file ist $.SYSLIB.CRTE.CXX01, with library version 2 it is $.SYSLIB.CRTE.CXX02.
See also the notes on standard header files for POSIX library functions.
STD-INCLUDE-LIBRARY = <filename 1..54>
<filename> designates the name of the PLAM library that is to be searched for the required standard header files.
STD-INCLUDE-LIBRARY = <posix-pathname>
<posix-pathname> designates the name of the POSIX directory in which the required header files are to be searched. See "Compiler I/O in the POSIX file system" for a description of the term <posixpathname>.
This specification is not meaningful for standard headers of the CRTE, since they are obtained from the CRTE libraries.
STD-INCLUDE-LIBRARY = *LINK(...)
LINK-NAME = <filename 1..8>
A link name can also be specified instead of the cataloged PALM library name. <filename> designates the link name of the assigned header library. This link name must already have been assigned to the PLAM library (with the ADD-FILE-LINKcommand) before the compiler is called.
CURRENT-LIBRARY = *UNCHANGED / *YES / *NO
This option determines the search for header files requested with the #include "
..."
directive.
*YES: By default, when searching for headers, the library or directory of the source or header containing the #include
directive is searched first, followed by the directories/libraries specified with the USER-INCLUDE-LIBRARY option. This corresponds to the behavior of the compiler in POSIX.
If the source program is contained in a cataloged BS2000 file, header files are searched for in the cataloged BS2000 files.
*NO: If *NO is set, only the directories/libraries specified in the USER-INCLUDE-LIBRARY option are searched. This corresponds to the behavior of the earlier C and C++ V2.2 compilers.
Standard header files for POSIX library functions
The standard header files required for the use of the POSIX library functions are not contained in the library $.SYSLNK.CRTE. They are located in the library
$.SYSLIB.POSIX-HEADER, which is supplied with the product BS2000/OSD BC. This library must always be specified in addition to the library $.SYSLNK.CRTE if the program uses POSIX functions. Furthermore, the _OSD_POSIX
directive must be set before the occurrence of the first #include
directive in the program. This is guaranteed, for example, if the DEFINE option of the MODIFY-SOURCE-PROPERTIES statement is used for the definition at compilation.
Examples of the MODIFY-INCLUDE-LIBRARY statement
Example 1
The source program is located in a PLAM library named PLAM.SOURCE, and extended C11 is set as the language mode.
The source program contains the directive
#include "incl.h"
The user makes the following entries:
//MODIFY-INCLUDE-LIBRARIES USER-INCL-LIB=(*STANDARD-LIBRARY,LIB1,- //*LINK(LIB2),*SOURCE-LIBRARY,’/home/user-incl’)
Since the CURRENT-LIBRARY option is not specified, CURRENT-LIBRARY=*YES applies.
Search procedure:
The following libraries/directories are searched in sequence for the "incl.h"
header:
PLAM.SOURCE | (Due to the option CURRENT-LIBRARY=*YES, the library of the |
$.SYSLIB.CRTE | (Standard header library) |
LIB1 | (Library with the name LIB1) |
LIB2 | (Library with the link name LIB2) |
PLAM.SOURCE | (Source program library) |
/home/user-incl | (POSIX directory with the name /home/user-incl) |
Example 2
The source program is located in a PLAM library named PLAM.SRC, and Cfront C++ is set as the language mode.
The user makes the following entries:
//MODIFY-INCLUDE-LIBRARIES USER-INCLUDE-LIBRARY = ($XYZ.LIB,- //*SOURCE-LIBRARY, LIB1),STD-INCLUDE-LIBRARY = (*USER-INCLUDE-LIBRARY,- //*STANDARD-LIBRARY),CURRENT-LIBRARY = *NO
In this case, the search for header files will proceed as follows:
$XYZ.LIB |
$XYZ.LIB |
Example 3
The source program is located in the POSIX directory /home/xy/src
, and extended C11 is set as the language mode.
The user makes the following entries:
//MODIFY-INCLUDE-LIBRARIES - //USER-INCLUDE-LIBRARY=(*SOURCE-LIBRARY, ’/home/xy/incl1’, *STANDARD-LIBRARY),- //STD-INCLUDE-LIBRARY=(*STANDARD-LIBRARY, $.SYSLIB.POSIX-HEADER,- //*USER-INCLUDE-LIBRARY,’/home/xy/incl2),CURRENT-LIBRARY=*NO
In this case, the search for header files will proceed as follows:
/home/xy/src |
$.SYSLIB.CRTE |