H-Series Application Migration Guide (H06.03+)
The TNS/E Native Development Environment
H-Series Application Migration Guide—429855-006
2-4
TNS/E Native C++ Compiler
TNS/E Native C++ Compiler
The TNS/E native C++ compiler accepts C++ language source files. The TNS/E native
C++ compiler accepts HP extensions and most C++ features in the ANSI base
document for the C++ standard (excluding exception handling).
The native C++ compiler can be run in the Guardian and OSS environments and on
the PC either at the Windows command prompt or as part of ETK (TDS is not
supported in the H-series RVUs). The CPPCOMP command runs the compiler in the
Guardian environment. The native C++ compiler command line syntax is similar to that
of the TNS/R native C++ compiler NMCPLUS. The TNS/E native c89 utility syntax is
similar to that of the TNS and TNS/R native c89 utilities.
ETK enables you to compile and link programs on a PC. You can target the
compilation for either the TNS/R or TNS/E environment, then copy the object files to
the appropriate NonStop system and execute them in the Guardian and OSS
environments. A new option is provided to specify the target platform (TNS/R or
TNS/E) of the compilation. The default is to compile for the TNS/R platform. See the
C/C++ Programmer’s Guide for details.
Most TNS/R native C++ programs can be compiled with the TNS/E native C++
compiler with no source code changes. The H-series RVUs support the VERSION2
and VERSION3 C++ dialects but do not support the VERSION1 dialect. Programs that
use the VERSION1 dialect must be converted to use either VERSION2 or VERSION3.
This migration might require some source code changes. Only the VERSION3 dialect
conforms to the ANSI and ISO standards for C++.
VERSION3 is the default dialect on H-series and G06.xx systems. You select
VERSION2 through a command line option. See Native C and C++ Run-Time Library
and Tools.h++ Migration Issues on page 5-7 for more information on converting to a
different C++ dialect.
Native COBOL Compiler
The TNS/E native COBOL compiler accepts COBOL language source files that comply
with the ISO/ANSI COBOL85 Standard. The TNS/E native COBOL compiler also
accepts HP language extensions.
The TNS/E native COBOL compiler can be run in the Guardian and OSS environments
and on the PC either at the Windows command prompt or as part of ETK (TDS is not
supported in the H-series RVUs). The ECOBOL command runs the COBOL compiler
in the Guardian environment. The ECOBOL command line syntax is similar to that of
the TNS/R NMCOBOL compiler. The ecobol utility runs the COBOL compiler in the
OSS environment and on the PC. The ecobol command line syntax is similar to that of
the nmcobol utility.
Cross-Compiling on the PC
You can compile and link C, C++, pTAL, and COBOL programs on a PC running the
Windows operating system, either within ETK or from the Windows command prompt.