Product SiteDocumentation Site

3.9.6. Compiling and Linking PMAPI Applications

Typical PMAPI applications require the following line to include the function prototype and data structure definitions used by the PMAPI.
#include <pcp/pmapi.h>
Some applications may also require these header files: <pcp/impl.h> and <pcp/pmda.h>.
The run-time environment of the PMAPI is mostly found in the libpcp library; so to link a generic PMAPI application requires something akin to the following command:
          cc mycode.c -lpcp