The C code should include gprolog.h which provides a set of C definitions (types, macros, prototypes) associated to the API. Include this files as follows:
#include <gprolog.h>
If the installation has been correctly done nothing else is needed. If the C compiler/preprocessor cannot locate gprolog.h pass the C compiler option required to specify an additional include directory (e.g.-Iinclude_dir) to gplc as follows (section 4.4.3):
The file gprolog.h declares the following C types:
New in GNU Prolog 1.3.1 and backward compatibility issues: in GNU Prolog 1.3.1 the API has been modified to protect namespace. The name of public functions, macros, variables and types are now prefixed with Pl_, PL_ or pl_. All these prefixes should be avoided by the foreign C-code to prevent name clashes. To ensure a backward compatibility, the names used by the old API are available thanks to a set of #define. However, this deprecated API should not be used by recent code. It is also possible to prevent the definition of the compatibility macros using:
#define __GPROLOG_FOREIGN_STRICT__ #include <gprolog.h>
In addition, gprolog.h defines a set of macros:
If you need to write code which depends on a specific version, you must be more careful. Recall these macros appeared in GNU Prolog 1.3.1 (undefined before), each time the minor version is increased, the patch level is reset to zero; each time the major version is increased (which happens rarely), the minor version and patch level are reset.
Note the above PL_PROLOG_... macros are also accessible via Prolog flags thanks to the built-in predicate current_prolog_flag/2 (section 8.22.2)