C/C++ Programmer's Guide (G06.25+)
Compiling and Linking TNS/E Native C and C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
17-9
Working in the Guardian Environment
modules, you must specify the -set floattype IEEE_FLOAT flag. If this flag is not
specified, eld generates error messages because of the mismatch between Tandem
and IEEE floating-point formats. When this flag is specified, eld generates a warning
message about the mismatch and builds the executable file MYEXEC. CCPLMAIN (an
object file) is a standard item, required when linking C programs.
Use the -set and -change flags of the eld utility to set or change the
float_lib_overrule attribute when creating object files. If the
float_lib_overrule is specified more than once by either the -set or -change
flags, all occurrences except the last one are ignored. The float_lib_overrule
attribute can be changed only for executable files. An error occurs if an attempt is
made to change the value of this attribute for relinkable files.
For More Information
See the following for more information about using floating-point formats:
•
Guardian Programmer’s Guide for information about building programs using IEEE
floating-point format
•
Guardian Procedure Calls Reference Manual for information about operating mode
routines and routines for converting between Tandem and IEEE floating-point
formats
•
The descriptions of pragmas IEEE_FLOAT on page 13-45 and TANDEM_FLOAT
on page 13-102
Working in the Guardian Environment
In the Guardian environment, you can compile and link programs for either the
Guardian or Open System Services (OSS) environment.
Compiling a Module
The native compilers translate the source text of a module and produce the following:
•
An extensive compiler listing; several pragmas enable you to control the content of
this compiler listing
•
A nonexecutable object file (if the compiler encountered no errors during the
compilation)
After compiling all the modules that compose your program, you collect and combine
them into a program file (an executable object file) by using the eld utility.
If your program comprises a single module, you can use the RUNNABLE pragma to
direct the compiler to produce a program file instead of a nonexecutable object file.
If your program comprises more than one module, you can use the RUNNABLE and
LINKFILE pragmas to direct the compiler to produce a linked program file instead of a
nonexecutable object file. For details, see pragma LINKFILE on page 13-57.