CRE Programmer's Guide
Compiling and Linking Programs for the Native CRE
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
4-3
Linking Modules
does not require any ENV directives. The compiler issues a warning for any ENV
directives that it finds.
If your pTAL routines call CRE functions, you must compile the routines with a
SOURCE directive that references the external declarations file for the CRE function
as follows:
These external declarations files are located in $SYSTEM.SYSTEM by default. Each
declaration is placed within a pTAL SECTION directive. Some declarations contain
pTAL BLOCK statements to declare global data blocks. Your program should read the
source code from only those sections of the files that contain declarations you need in
your program. Programs that use these declarations must follow the coding guidelines
for BLOCK declarations. Refer to the
pTAL Reference Manual for details.
Linking Modules
When linking modules to create a program that runs in the CRE, you must specify the
correct shared run-time libraries (SRLs) or dynamic-link libraries (DLLs) for the
resolution of external references to CRE and native C or COBOL run-time library
functions, and in certain cases you must specify an additional library. By default, the
OSS and PC workstation
c89, nmcobol, and ecobol utilities specify the correct SRLs
or DLLs for the CRE.
If you run the
nld or ld utility to perform the linking, you must:
•
Always search the CRE SRL file, ZCRESRL
•
When there are TNS/R native C modules, search the TNS/R native C run-time
library SRL file, ZCRTLSRL
•
When there are TNS/R native COBOL modules, search the TNS/R native COBOL
run-time library SRL file, ZCOBSRL
•
When the main routine is written in TNS/R native C, link in the TNS/R native C run-
time library object file, CRTLMAIN for a non-PIC file or CCPPMAIN for a PIC file
If you run the
eld utility to perform the linking, you must:
•
Always search the CRE DLL file, ZCREDLL
•
When there are TNS/E native C modules, search the TNS/E native C run-time
library DLL file, ZCRTLDLL
•
When there are TNS/E native COBOL modules, search the TNS/E native COBOL
run-time library DLL file, ZCOBDLL
If the Function Name Begins With: Specify This File:
CRE_ CRERDECS
RTL_ RTLRDECS
CLU_ CLURDECS