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

Table 47 Development Platform Capabilities (TNS/E Native C and C++ Programs) (continued)
YesNoYesNoUse OSS development
tools for Guardian
programs?
YesNoYesNoUse OSS development
tools for OSS programs?
YesNoYesYesRun Guardian programs?
YesNoYesNoRun OSS programs?
YesYesYesYesCompile programs with
embedded SQL?
YesYesNoNoUse PC-based
development tools for
Guardian and OSS
programs?
These restrictions apply to developing Guardian programs with OSS tools:
You cannot use the RUNNABLE and SEARCH pragmas. However, you can direct the c89 utility
to bind implicitly after a compilation. You can also specify library files to be searched using
the c89 -L flag.
You cannot use the SSV pragma. However, you can specify search directories using the c89
-I flag.
Specifying Header Files
The macros and functions in the TNS/E native C run-time library are declared in header files. Each
header file contains declarations for a related set of library functions and macros, in addition to
variables and types that complete that set. If you use a function in the library, you should include
the header file in which it is declared. You should not declare the routine yourself because the
declarations in the header files have provisions for several situations that can affect the form of a
given declaration, including:
Whether the routine is implemented internally as a function or a macro
Whether the function is written in a language other than C
Whether you are compiling for the small-memory or large-memory model
Whether you are compiling for the 16-bit or 32-bit (wide) data model
Whether you are compiling for the NonStop environment
Whether you are compiling for TNS mode or native mode
In addition, the header file prototype declarations enable the compiler to check parameters and
arguments for compatibility, ensuring that function calls provide the correct number and type of
arguments.
A single set of TNS/E native C library header files supports all three environments (Guardian,
OSS, and PC) and all three modes (TNS, TNS/R native, and TNS/E native). The locations of the
header files in the three environments is summarized in Table 48.
Table 48 Locations of Header Files
LocationEnvironment
$SYSTEM.SYSTEM and $SYSTEM.ZTCPIPGuardian
/usr/include and its subdirectoriesOSS
ETK Version 3.0 or later: \Compaq ETK-NSE\rel\usr\include, where rel
represents the release version update, such as H06.02
PC
300 Compiling and Linking TNS/E Native C and C++ Programs