COBOL Manual for TNS and TNS/R Programs
Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs—522555-006
13-12
Building a DLL From a Single Source File
Topics:
•
Guardian Environment: One-Step Method
•
Guardian Environment: Two-Step Method
•
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
•
LD 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.
Example 13-1. Building a DLL From a Single Source File in One Step (Guardian)
NMCOBOL /IN LIB1/ MYDLL; SHARED; RUNNABLE; &
&LD(-export_all)
Note. Do not use the RUNNABLE directive.