C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

Binding C++ Programs
If you do not use the RUNNABLE pragma when compiling a single-module program or if your
program comprises several separately compiled modules, you must use Binder to collect and
combine the compiled modules into an executable C++ object file.
To start Binder, enter the BIND command at the TACL prompt:
10> BIND
Binder Commands
After starting Binder, you enter Binder commands to combine your compiled modules with the TNS
C++ run-time library object files and with the TNS C run-time library object files to produce an
executable C++ TNS object file. The Binder commands you can use are shown in this diagram.
SELECT RUNNABLE OBJECT ON
SELECT CHECK PARAMETER OFF
SET INSPECT ON
ADD * FROM main-object-file
ADD * FROM object-file
SELECT SEARCH C++-library-file
SELECT SEARCH data-model-file
SET HEAP value PAGES
BUILD program-file
SELECT RUNNABLE OBJECT ON
directs Binder to create an executable object file (a program file) when it builds the object file.
SELECT CHECK PARAMETER OFF
disables checking of parameter number, type, and mode (value or reference) and of function
return type across code blocks. If you do not disable these checks, Binder might generate
several extraneous warning messages.
SET INSPECT ON
specifies that the currently defined symbolic debugging program, rather than the default
debugging program, is chosen for debugging when you run the object file.
ADD * FROM main-object-file
adds the object file of your program's main module. This main module is the one that contains
the definition of the function main().
ADD * FROM object-file
adds the object file of one of your program's other modules. You must repeat this command
for each of your modules.
SELECT SEARCH C++-library-file
directs Binder to search the appropriate C++ run-time library file when resolving external
references.
Specify LIBCA if your program uses the 32-bit data model. For the 32-bit data model, the size
of the type int is 32 bits.
Specify LIBLA if your program uses the 16-bit data model. For the 16-bit data model, the size
of the type int is 16 bits.
SELECT SEARCH data-model-file
directs Binder to search the specified data-model file when resolving external references.
Use CWIDE for the data-model-file to specify the 32-bit data model.
Use CLARGE for the data-model-file to specify the 16-bit data model.
The data-model-file file name must be fully qualified. CWIDE and CLARGE are in
$SYSTEM.SYSTEM by default.
Working in the Guardian Environment 281