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

Table Of Contents
Compiling, Binding, and Accelerating TNS C
Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
14-10
Restrictions on Binding Caused by the ENV Pragma
your BIND scripts to ensure that you do not bind in CLIB or CRELIB. Look for
statements such as:
SELECT SEARCH clib
ADD * FROM clib
Delete any old copies of CLIB from $SYSTEM.SYSTEM.
Restrictions on Binding Caused by the ENV Pragma
Binder categorizes the ENV pragma options into three groups: OLD, NEUTRAL, and
COMMON. For the most part, these groups match the various ENV options. Table 14-3
shows how Binder classifies object files into one of three groups depending on the
compiler version or specified ENV option.
These rules apply for binding modules together:
You can bind object files that are in the same Binder group; the resulting object file
runs in the same environment as the input object files.
You can bind object files that include routines from both the OLD and NEUTRAL
Binder groups; the resulting object file runs in a language-specific run-time
environment.
You can bind object files that include routines from both the COMMON and
NEUTRAL Binder groups; the resulting object file runs in the CRE.
You cannot bind object files that include routines from both the COMMON and OLD
Binder groups.
When you bind object files compiled for different environments, each procedure retains
its original ENV attribute. Table 14-4 shows the run-time environment resulting from
binding modules from different Binder groups together.
Table 14-3. Binder Grouping of ENV Pragma Options
Binder Group Generated by
OLD C-series C compilers by default
COMMON D-series C compilers by default
D-series C compilers with ENV COMMON specified
D-series C compilers with ENV LIBRARY specified
NEUTRAL D-series C compilers with ENV EMBEDDED specified
D-series C compilers with ENV LIBSPACE specified