Static linkage with BINDER
C or COBOL program (object module or link-and-load module)
/START-BINDER //START-LLM-CREATION INT-NAME=internal-name ------------------------ (1) //INCLUDE-MODULES LIB=..., ELEM=... -------------------------------- (2) //RESOLVE-BY-AUTOLINK LIB=userlibrary ------------------------------ (3) //RESOLVE-BY-AUTOLINK LIB=$.SYSLNK.CRTE ---------------------------- (4) //SAVE-LLM LIB=..., ELEM=... --------------------------------------- (5) //END
(1)
A link-and-load module with the name internal-name is generated.
(2)
The program modules are explicitly included.
(3)
The user library
userlibrary
is statically linked using the Autolink function.(4)
The library $.SYSLNK.CRTE which, among other things, contains the complete C and COBOL runtime system, is statically linked with the Autolink function.
(5)
The generated, current link-and-load module is saved.
C++-Program, Cfront mode (link-and-load module) for compiler versions
<=
V2.2/START-BINDER //START-LLM-CREATION INT-NAME=internal-name ------------------------ (1) //INCLUDE-MODULES LIB=..., ELEM=... -------------------------------- (2) //RESOLVE-BY-AUTOLINK LIB=userlibrary ------------------------------ (3) //RESOLVE-BY-AUTOLINK LIB=($.SYSLNK.CRTE,$.SYSLNK.CRTE.CPP) -------- (4) //SAVE-LLM LIB=..., ELEM=... --------------------------------------- (5) //END
(1)
A link-and-load module with the name internal-name is generated.
(2)
The program modules are explicitly included.
(3)
The user library
userlibrary
is statically linked using the Autolink function.(1)
A link-and-load module with the name internal-name is generated.
(2)
The program modules are explicitly included.
(3)
The user library
userlibrary
is statically linked using the Autolink function.(4)
The following are also statically linked with the Autolink function:
The library $.SYSLNK.CRTE which, among other things, contains the complete C and COBOL runtime system (see "CRTE V10.1A selectable unit").
The library $.SYSLNK.CRTE.CPP which contains the Cfront-C++ library functions (see section “Cfront-C++-library functions and runtime system”).
(5)
The current link-and-load module is saved.
Cfront C++ program (link-and-load module) for compiler versions as of V3.0
/START-CPLUS-COMPILER ----------------------------------------------- (1) //MODIFY-BIND-PROPERTIES INCLUDE=*LIB(LIB=...,ELEM=...) //MODIFY-BIND-PROPERTIES RESOLVE=*AUTOLINK(userlibrary) //MODIFY-BIND-PROPERTIES RUNTIME-LANG=CPLUSPLUS(CPP),STDLIB=STATIC //BIND OUTPUT=*LIB(LIB=...,ELEM=...)
(1)
The linkage editor is implicitly called by the C++ compiler.The following statements for the C++ compiler have the same functionality as the BINDER statements in Example 2.