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-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 in order 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 as follows:
•
In the Guardian environment, use the SSV pragma to specify a search list of
subvolumes for files specified in #include directives. For more information, see
pragma SSV on page 13-94.
•
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 information, 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 information, 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. The
following 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 release of the HP NonStop
operating system and the G06.06 or later
product version of the native C and C++
compilers