ASAP 1.1 Hybrid Manual

HP NonStop ASAP Hybrid Manual 529729-004
Page 4-3
Developing Applications Using the ASAP
Hybrid API
To use the ASAP Hybrid for Linux API from a client application:
1. Define client application entities using the ASAP Entity Definition Language
(EDL), and load these definitions into your ASAP environment. For more
information on EDL, see the ASAP Extension Manual and the ASAP Client
Manual.
2. Include the asapx.h header file in your application source. For example:
#include “asapx.h”
3. Modify your make file or compiler commands to search for the asapx.h
header file in the include directory created when ASAP Hybrid for Linux was
installed. For more information on installation locations, see Installing ASAP
Hybrid for Linux.
4. Modify your make file or compiler/linker commands to search for the
appropriate API library files in the lib directory created when ASAP Hybrid for
Linux was installed. For more information on installation locations, see
Installing ASAP Hybrid for Linux. For details on linking to the various library
versions, see ASAP Hybrid for Linux API Libraries.
5. Modify your make file or compiler/linker commands to link to the Linux
Pthreads library (libpthread). Because the ASAP Hybrid for Linux API utilizes
Pthreads to support thread-safe callers, the Pthreads library must be available
at all times. This step is required even if you are developing a single-threaded
application and are not using thread-safe ASAP API calls. However, in that
case, no Pthreads library procedures would actually be called at run time by
the ASAP API, so no extra overhead would be introduced into the calling
application.
6. Modify your application source to call the necessary ASAP Hybrid for Linux
API procedures. For a description of the various API calls, see API Details.
The basic rules follow:
Register at least one domain using the asap_register procedure.