nld and noft Manual
nld Utility
nld and noft Manual—520384-003
2-11
C++ Programs
The version, known as the C++ Dialect, is stored in one of the program's internal
structures. To see a program’s C++ dialect, use the noft option LISTATTRIBUTE or LA
on page 5-22.
Mixing versions of C++ in a loadfile is not recommended (except for mixing
CPP_NEUTRAL with one other version). The result is either a nonfatal error or a
warning, depending on the combination:
For information about nonfatal errors and warnings, see Nonfatal Errors on page 10-61
and Warnings on page 10-69.
C++ programs require access to their run-time environments. To create an executable
C++ program, you must link to the run-time environment initialization code and the
shared run-time libraries (SRLs) your program uses. The NMC and c89 compilers
automatically link to the required items. If you use nld directly to link a C++ program,
you must specify these items in nld options. For details, see the C/C++ Programmer’s
Guide.
Follow these step to create an executable C++ program using nld:
1. Link together the object code files that you compiled.
2. Link to the C++ run-time library initialization object code file:
C++ Input Files C++ Version Recorded in the Loadfile*
VERSION1 CPP_V1 (1)
VERSION2 CPP_V2 (2)
VERSION3 CPP_V3 (3)
Mixed versions Lowest version
*
When none of the input files are C++ files, the value CPP_NEUTRAL is recorded in the loadfile.
LINKFILE
CPP_NEUTRAL CPP_V1 CPP_V2 CPP_V3
L
I
N
K
F
I
L
E
CPP_NEUTRAL Loadfile is
CPP_NEUTRAL
Loadfile is
CPP_V1
Loadfile is
CPP_V2
Loadfile is
CPP_V3
CPP_V1 Loadfile is
CPP_V1
Loadfile is
CPP_V1
Warning
Loadfile is
CPP_V1
Nonfatal
error
CPP_V2 Loadfile is
CPP_V2
Warning
Loadfile is
CPP_V1
Loadfile is
CPP_V2
Nonfatal
error
CPP_V3 Loadfile is
CPP_V3
Nonfatal
error
Nonfatal
error
Loadfile is
CPP_V3
Environment Run-Time Library Initialization Object Code File
Guardian $SYSTEM.SYSTEM.CRTLMAIN
OSS /usr/lib/crtlmain.o