COBOL Manual for TNS/E Programs (H06.03+)
Libraries and Utility Routines
HP COBOL Manual for TNS/E Programs—520347-003
13-5
Building a DLL From a Single Source File
•
OSS Environment: One-Step Method
•
OSS Environment: Two-Step Method
•
PC Environment: One-Step Method
•
PC Environment: Two-Step Method
Guardian Environment: One-Step Method
Compile the source file with these directives:
•
SHARED
•
RUNNABLE
•
ELD with either of these options:
°
-export_all, which exports all program names in the source file
°
-export program-name, which exports only the specified program name.
You must repeat this option for every program name that you want to export.
The resulting loadfile is a DLL.
The command in Example 13-1 compiles the source file LIB1 and links the resulting
object file, creating a DLL named MYDLL.
Guardian Environment: Two-Step Method
1. Compile the source file with the directive SHARED.
The result is a linkfile.
2. Link the linkfile, using the eld utility with these options:
•
Either:
°
-export_all, which exports all program names in the source file
°
-export program-name, which exports only the specified program
name. You must repeat this option for every program name that you want
to export.
•
-optional_lib -l ZCOBDLL -l ZCREDLL, which links your file with the
SRLs named ZCOBDLL and ZCREDLL
The resulting loadfile is a DLL.
Example 13-1. Building a DLL From a Single Source File in One Step (Guardian)
ECOBOL /IN LIB1/ MYDLL; SHARED; RUNNABLE; &
&ELD(-export_all)
Note. Do not use the RUNNABLE directive.










