
nld Utility
nld and noft Manual — 520384-003
2- 10
C++ Programs
5. If you want to overload the
new
and
delete
operations, you must link these files
to your program:
For information about active backup programming in C, see the
Guardian
Programmer’s Guide
.
Example 2-10
takes a C source program named
MYSRC
, compiles it into an object file
named
MYOBJ
, and creates a loadfile named
MYEXEC
. It links to the C run-time library
initialization object file named
CRTLMAIN
and the SRLs named
ZCRESRL
and
ZCRTLSRL
. In the Guardian environment,
ZCRESRL
and
ZCRTLSRL
are located in the
active
SYSnn
subvolume.
C++ Programs
There are three versions of C++:
When you compile a C++ program, you can specify its version with the command-line
directive VERSION1, VERSION2, or VERSION3. The default is VERSION3.
Environment
Active Backup Programming Support Object Code File
Guardian
$SYSTEM.SYSTEM.CPPINIT
OSS
/usr/lib/cppinit.o
Example 2-10. Creating an Executable C Program
Guardian Environment
NLD $SYSTEM.SYSTEM.CRTLMAIN MYOBJ -o MYEXEC &
-l ZCRESRL -l ZCRTLSRL
OSS Environment
nld /usr/lib/crtlmain.o myobj -o myexec -l zcresrl -l zcrtlsrl
Version
Conforms to ANSI and
ISO Standards for C++
Supports
PIC (position-independent code)
1
No
No
2
No
Yes
3 (default)
Yes
Yes
Summary of Contents for nld
Page 12: ...Contents nld and noft Manual 520384 003 x ...
Page 16: ...What s New in This Manual nld and noft Manual 520384 003 xiv Miscellaneous ...
Page 22: ...About This Manual nld and noft Manual 520384 003 xx Change Bar Notation ...
Page 28: ...Introduction to the Utilities nld and noft Manual 520384 003 1 6 strip ...
Page 60: ...nld Utility nld and noft Manual 520384 003 2 32 Declaration and Definition ...
Page 78: ...nld Options nld and noft Manual 520384 003 3 18 y ...
Page 90: ...noft Utility nld and noft Manual 520384 003 4 12 Debugging With noft ...
Page 150: ...strip Utility nld and noft Manual 520384 003 7 2 ...
Page 242: ...nld Diagnostic Messages nld and noft Manual 520384 003 10 82 Informational Messages ...
Page 278: ...noft Diagnostic Messages nld and noft Manual 520384 003 11 36 Syntax Errors ...
Page 286: ...ar Diagnostic Messages nld and noft Manual 520384 003 12 8 ...
Page 314: ...Sample nld and noft Session nld and noft Manual 520384 003 A 28 LISTSRLFIXUPS ...
Page 330: ...Index nld and noft Manual 520384 003 Index 10 Special Characters ...