nld Manual
nld Utility
nld Manual—528272-001
2-7
Command-Line Interface Linking Options
Command-Line Interface Linking Options
The command-line interface link options for C/C++ and COBOL are:
•
-l=library
•
-L=directory
•
-s
•
-Wansistreams
•
-WBdynamic
•
-WBstatic
•
-Wheap=N[b|w|p]
•
-Whighpin={on|off}
•
-Whighrequesters={on|off}
•
-W[no]inspect
•
-Wnld="arguments"
•
-Wnld_obey file
•
-Wnostdlib
•
-Wr
•
-Wrunnamed
•
-W[no]saveabend
•
-Wx
Changing the Target Environment
The target environment is the environment in which you intend to run the program file.
By default, the Guardian version of nld builds files intended to run in the Guardian
environment and the OSS version of nld builds files intended to run in the OSS
environment.
To build a program file intended to run in the Guardian environment using the OSS
version of nld, specify:
-set systype guardian
To build a program file intended to run in the OSS environment using the Guardian
versions of nld, specify:
-set systype oss
Example 2-9, in the OSS environment, links the object files names obj6.o and
obj7.o into a program named prog that you intend to run as a Guardian process.
Note. In some cases, such as when C/C++ programs include stdio.h, setting the target
environment with the -set systype option might result in a program that executes incorrectly
in the specified environment. In such cases, you must specify the systype option on the
compiler command line to ensure the correct code is created.
Example 2-9. Creating a Program for the Guardian Environment (OSS)
nld obj6.o obj7.o -o prog -set systype guardian