CRE Programmer's Guide
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
3-1
3
Compiling and Binding Programs for
the TNS CRE
Read this section for information about compiling and binding TNS and accelerated
programs that run in the Common Run-Time Environment (CRE). This section
describes both the Guardian and OSS environments, but focuses on the Guardian
environment. Refer to the
C/C++ Programmer’s Guide and COBOL Manual for TNS
and TNS/R Programs for information about compiling and binding in the OSS
environment on G-series systems.
Refer to Section 4, Compiling and Linking Programs for the Native CRE
, for details on
compiling and linking native programs.
Before you can use the information in this section, you must convert your existing
C-series file system programs to meet the requirements of the D-series file system
procedures. Refer to the
Guardian Application Conversion Guide for detailed
conversion information.
Compiling Programs for the CRE
There are two major changes in compiling programs for the CRE as opposed to
compiling programs that do not use the CRE. To compile a program for the CRE, you
might need to:
•
Specify the desired run-time environment with an ENV compiler directive
•
Use a SOURCE directive to specify the external declarations for CRE library
functions that are called from TAL routines
Specifying a Run-Time Environment
You use the ENV directive to specify the run-time environments in which a program
can run. For each of the ENV options, the compilers generate different code and
impose different restrictions on which run-time libraries and language features routines
can use.
Table 3-1
on page 3-2 shows the availability of run-time libraries, depending on the
specified ENV option.
Note. TNS object code, accelerated object code, and native object code cannot be mixed in
one program file. Thus, you cannot mix modules compiled by a TNS compiler or processed by
the Accelerator or Object Code Accelerator with modules compiled by a TNS/R or TNS/E
native compiler.
Note. Compiler directives are called “pragmas” in the C language. This manual uses the
term “directive” to refer both to directives and to pragmas.