HP DCE/9000 Version 1.7 Application Development Tools for HP-UX 11.0 Release Note

30 HP DCE 1.7 Application Development Tools Release Note
Developing DCE Applications with HP DCE/ 9000
Building DCE Programs
Building DCE Programs
NOTE Hewlett-Packard supports only the ANSI C compiler for building
HP DCE applications. Hewlett-Packard cannot provide support for
problems with HP DCE applications not compiled using ANSI C. This
restriction also applies to applications on HP-UX 10.x systems built
using the HP-UX user-space threads library (libcma).
When compiling and linking HP DCE applications, note the following:
In order for the correct header file contents to be used, define
_HPUX_SOURCE when compiling your HP DCE application:
-D_HPUX_SOURCE.
You must define _REENTRANT and _PTHREADS_DRAFT4 when
compiling HP DCE programs for the following reasons:
To ensure that the threadsafe routines such as putc, putchar,
getc, and get char are used instead of the non-thread-safe macro
versions defined in stdio.h.
To get definitions of new structures and to provide ANSI C
prototype information for the new reentrant interfaces.
If you include <pthread.h>, you must do so before other header files
in your C source file. Also note that <pthread.h> defines
_REENTRANT.
Source code that is built into applications that use the CDS, RPC, or
security APIs must include <pthread.h>. This is necessary because
the DCE RPC runtime library creates a small number of private
threads, on both the client and server sides of an application.
The DCE header files should be included as <dce/ header.h>. Because
names of some of the DCE header files conflict with those in
-/usr/include, you should avoid using the -I/usr/include/dce C
preprocessor option to include DCE header files.
DCE applications must always link with libdce. When linked with
other libraries, libdce must be linked first, as follows:
-ldce other_libraries
Do not link in libc explicitly when building a DCE application.