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

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-13
CHECK
°
If you specify -Wcall_shared, the compilation results in a PIC executable
object file (a PIC loadfile).
°
If you specify the -c option with -Wcall_shared, the linker is not called, and
the result is a PIC linkable object file (a PIC linkfile).
If you specify the CALL_SHARED pragma, the compiler driver passes these to the
eld or ld linker:
°
For a TNS/R program, CCPPMAIN (Guardian) or ccppmain.o (On OSS
environment or PC)
°
For a TNS/E program, CCPLMAIN (Guardian) or ccplmain.o (On OSS
environment or PC)
°
For a TNS/R C++ version 2 program, CPPINIT2 (Guardian) or cppinit2.o (On
OSS environment or PC)
°
For TNS/R C++ version 3 program, CPPINIT4 (Guardian) or cppinit4.o (On
OSS environment or PC)
The CALL_SHARED and SHARED pragmas cannot be used with the SRL or
NON_SHARED pragmas. A warning is issued if these pragmas are combined.
EXTERN_DATA gp_ok is not compatible with generation of shared code. The
compiler issues a warning if this pragma is combined with the SHARED pragma or
CALL_SHARED, and ignores the GP_OK directive.
For complete information about programming with DLLs and linker options for
DLLs, see the:
°
DLL Programmer’s Guide for TNS/R Systems
°
DLL Programmers Guide for TNS/E Systems
°
eld Manual
°
ld Manual
°
rld Manual
CHECK
The CHECK pragma controls the inclusion of run-time error-checking code in the object
file. The CHECK pragma directs the TNS C compiler to include these run-time checks,
and NOCHECK directs it to omit them.
[NO]CHECK