This section provides information on release compatibility, purpose, and architecture of the API.
The Helix C/C++ API is subject to change from release to release, and is not guaranteed to be source-code compatible from one release to the next. However, applications that you create using the API can run against previous releases of Helix server and should also run against later releases of Helix server.
Support for specific features depends on the version of Helix server and the API that you use.
The Helix C/C++ API enables you to create applications that:
- interact with end users
- send commands to the Helix server
- process the data the Helix server returns
The client session is managed by a C++ class called
ClientApi. (See ClientApi methods)
User interaction is channeled through the
ClientUser C++ class. The default methods of
ClientUser implement the
p4 command line
interface. To create a custom client application, create a subclasses of
ClientUser. (See ClientUser methods)
The Helix C/C++ API consists of:
- header files (.h), which are in the include/p4 subdirectory
- platform-specific link libraries in the lib subdirectory
implementation of the
ClientUserclass, clientuser.cc, which is in the sample subdirectory
The API is packaged as an .tgz or .zip file. To download for your platform, do one of the following:
- go to
Helix Core FTP site at ftp://ftp.perforce.com/perforce/. For example, at ftp://ftp.perforce.com/perforce/r19.1/bin.macosx105x86_64/, you can download the
p4api.tgzfile, which is the 2019.1 release of the API for the 10.5 version of MacOS
- go to https://www.perforce.com/downloads/helix-core-c/c-api
The P4API source code is compatible with the C++98 language standard, except for the optional Helix Core Extensions (see Helix Core Extensions Developer Guide), which requires C++17.
The pre-built API distributions require either OpenSSL 1.0 or OpenSSL 1.1. The version of OpenSSL the API requires is in its file name. For example, p4api_vs2013_dyn_openssl1.1.1.zip requires the 1.1 version.
Similarly, versions must match for Windows VisualStudio.
For Linux platforms, the GLIBC version compatibility is part of the file name. For example, p4api-glibc2.12-openssl1.1.1.tgz was built with 1.1
For Extensions-compatible builds, the libstdc++ version must be at least GLIBCXX_3.4.22
For non-Windows platforms, the Pthreads library must be available.