C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-13
CALL_SHARED
°
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 the following
to the eld or ld linker:
°
For a TNS/R program, CCPPMAIN (on Guardian) or ccppmain.o (on OSS
or PC)
°
For a TNS/E program, CCPLMAIN (on Guardian) or ccplmain.o (on OSS
or PC)
°
For a TNS/R C++ version 2 program, CPPINIT2 (on Guardian) or cppinit2.o
(on OSS or PC)
°
For TNS/R C++ version 3 program, CPPINIT4 (on Guardian) or cppinit4.o (on
OSS 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 following manuals:
°
DLL Programmer’s Guide for TNS/R Systems
°
DLL Programmer’s Guide for TNS/E Systems
°
eld Manual
°
ld Manual
°
rld Manual