Google APIs Client Library for C++ A C++ library for client applications to access Google APIs.
Installation

This page contains information about installing the Google APIs Client Library for C++.

Contents

  1. System Requirements
  2. Obtaining the C++ Client
  3. Get Started

System Requirements

Obtaining the C++ Client

The C++ client libraries require some additional open source code packages. The packaging includes a script to download these from source and another to build them. You should also be able to use their prebuilt versions and standard installations by skipping the ./prepare_dependencies.py step.

tar xf googleapis-cpp_public.tar
python ./prepare_dependencies.py
./external_dependencies/install/bin/cmake .
make all test
make export

The following options can be given to ./prepare_dependencies.py:
--download_dir=DownloadDir
Changes the path to the directory to download and build the dependency libraries.
This is an optional argument. The default value is ./external_dependencies.
--install_dir=InstallDir
Changes the target directory path of the built dependency libraries and header files installation.
This is an optional argument. The default value is ./external_dependencies/install.
--force
Forces the dependencies to be rebuilt and installed.
Normally the script remembers when a dependency has been successfully prepared and not attempt it next time.
-b
Just build the dependencies. Do not download or install them.
Use this with --force if you want to force a re-build.
-d
Just download the dependencies. Do not build them.
Use this with --force if you want to re-download them.
-i
Just install the dependencies. Do not re-build them.
Use this with --force if you want to re-download them.
one or more package names
You can process individual dependencies by just passing the names.
For the current list of names, see the ./prepare_dependencies.py script itself.

make export creates a directory ./export that has include and lib subdirectories with all the header files and libraries you need to compile and link your applications against the libraries provided by the Google APIs Client Library for C++.

If you are using your own IDE to write programs remember to:

Get Started

The Jump In document provides a basic tutorial for writing your first client program using the Google APIs Client Library for C++. Source code samples are in the samples directory.