C/C++ Programmer's Guide (G06.25+)
TNS C++ Implementation-Defined Behavior
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
B-4
Interfacing to NonStop SQL/MP
Interfacing to NonStop SQL/MP
Cfront does not support embedded SQL. Embedded SQL support is provided by
binding in C modules containing the desired SQL statements. Keep all SQL statements
in one or more separately compiled C modules and bind these C modules into the
executable C++ object file with Binder.
HP Specific Features for the Guardian
Environment
The HP specific features discussed in this subsection are applicable to only the
Guardian environment.
Mixed-Language Programming
Mixed-language programming in the HP environment comprises invoking a C, COBOL,
FORTRAN, Pascal, or TAL routine from your C++ program, or calling a C++ function
from one of these other languages. A function declaration must always precede any
invocation of that function.
For information on interfacing to other languages, refer to the discussion on mixed-
language programming in Section 7, Mixed-Language Programming for TNS
Programs, and in Section 8, Mixed-Language Programming for TNS/R and TNS/E
Native Programs.
To call a C++ function from another language, call the C++ function as if it were a C
function but use the encoded name form. Get this encoded name form from the C
source file that is created by Cfront.
If you want to call a function written in another language from a C or C++ program,
your program must have a C main function.
You do not need to put the extern C construct around #include <cextdecs>
because the extern C construct has already been added to the <cextdecs> header
file for use by C++.
System-Level Programming
C++ supports system-level programming. System-level programming refers to the
ability to write C++ functions that reside in system code, system library, or user library.
Refer to the Section 9, System-Level Programming.
Differences Between OSS and Guardian
Environments
The OSS and Guardian versions of Cfront each default to generate code that is
destined to run in their own environment. This subsection discusses how to target code