C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiling and Linking TNS/E Native C and C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
17-4
Compiling and Linking Floating-Point Programs
You might also need to specify header files for the TNS/E native Standard C++ Library
and Tools.h++ library to use functions contained in those libraries. For examples of
#include directives for these libraries, see Section 5, Using the Standard C++ Library
and Section 6, Accessing Middleware Using HP C and C++ for NonStop Systems. For
information about including DLLs at link time, see Determining Which DLLs are
Required on page 17-14.
You can specify locations to search for header files:
In the Guardian environment, use the SSV pragma to specify a search list of
subvolumes for files specified in #include directives. For more details, see the
pragma SSV on page 13-96.
In the OSS environment, use the -I flag to the c89 utility to specify a search list of
directories for files specified in #include directives. For more details, see the
c89(1) reference page either online or in the Open System Services Shell and
Utilities Reference Manual.
In the PC (Enterprise Tool Kit) environment, specify a search list of directories
using the Directories page.
In the PC command line environment (using the cross compilers), use the -I flag
to the c89 utility to specify a search list of directories for files specified in
#include directives. For more details, see the document Using the Command-
Line Cross Compilers on Windows.
While header files are optional (but strongly recommended) for programs that contain
Guardian or OSS modules exclusively, header files are required for mixed-module
programs. If you do not compile using header files, eld cannot correctly resolve
external references to Guardian and OSS versions of C functions.
Compiling and Linking Floating-Point
Programs
You can now choose either Tandem floating-point format or IEEE floating-point format
for performing floating-point arithmetic in your native C and C++ programs. This table
compares the two formats.
Tandem Floating-Point Format IEEE Floating-Point Format
Default for TNS/R modules Default for TNS/E modules
A proprietary implementation of floating-
point arithmetic that is supported in software
millicode
An industry-standard data format that is
supported in the processor hardware
Provides backward compatibility with pre-
G07 C and C++ applications
Requires the G07 C and C++ applications and
the G06.06 or later RVUs for the TNS/R
native C and C++ compilers; requires the
H06.03 or later RVUs for the TNS/E native C
and C++ compilers.