Table of Contents

Advertisement

nld Utility
If the operating system cannot find a user library or system library procedure to satisfy
a run-time external reference, it displays a message as the process starts. When the
process calls an unresolved procedure, the process changes the call to the unresolved
procedure into a call to the Debug utility or the Inspect symbolic debugger, and the
process enters the debug state.
In the TNS environment, either or both the program file and the user library can be
processed by the Accelerator. TNS user libraries can contain embedded NonStop™
SQL/MP statements.
In the TNS/R environment, both the program file and the user library must be compiled
with TNS/R native compilers. TNS/R native user libraries cannot contain embedded
NonStop™ SQL/MP statements. Move procedures with embedded NonStop™
SQL/MP statements to user code before migrating a TNS user library to a TNS/R
native user library. (For more information on migrating TNS user libraries to TNS/R
native user libraries, see the TNS/R Native Application Migration Guide.)
A TNS/R native user library can contain its own data, which is allocated for each
process, in a separate location from the client program's data. A TNS/R native user
library can call functions in shared run-time libraries (SRLs), such as the C run-time
library. If a user library calls functions in an SRL, you must specify the SRLs when
linking. Do not link the CRTLMAIN object file to a user library.
To create a TNS/R native user library, follow these steps:
1. Compile the procedures that you want to put in the library.
If the procedures are written in ...
C or C++
COBOL85
pTAL
2. Use nld to link the resulting object files into a single executable user library.
Note. You can only link linkfiles into a user library. You cannot link loadfiles, or a
combination of loadfiles and linkfiles, into a user library.
Use the -o option to specify the name of the resulting object file.
Use the -ul option to specify that the resulting object file is a user library.
For example, in the Guardian environment, the following command links the object
files file1 and file2 into an executable user library named lib:
nld file1 file2 -o lib -ul
The following command is the OSS equivalent of the preceding command:
nld file1.o file2.o -o lib -ul
Compile them ...
With the SRL pragma and
without the RUNNABLE pragma
Without the RUNNABLE directive
With the SRL pragma
nld and noft Manual—520384-003
2- 14
Linking User Libraries

Advertisement

Table of Contents
loading

This manual is also suitable for:

Noft

Table of Contents