Chapter 4 Installing Connector/C++ from Source

Table of Contents

4.1 Building Connector/C++ from Source on Unix, Solaris, and OS X
4.2 Building Connector/C++ from Source on Windows
4.3 Dynamically Linking Connector/C++ Against the MySQL Client Library

MySQL Connector/C++ is based on the MySQL client library (MySQL C API) and is linked against it. Thus, to compile Connector/C++, the MySQL Client Library must be installed.

You also need the cross-platform build tool CMake 2.4, or newer, and GLib 2.2.3 or newer. Check the README file included with the distribution for platform-specific notes.

Typically, the MySQL client library is installed when the MySQL Server is installed. However, check your operating system documentation for other installation options.

As of Connector/C++ 1.1.0, the Boost C++ libraries 1.34.0 or newer must be installed. Boost is required to build the connector, but is not required to use the connector. You can obtain Boost and its installation instructions from the official site. Once Boost is installed, tell the build system where the Boost files are by defining the BOOST_ROOT:STRING option. This can be done when you invoke CMake. For example:

shell> cmake . -DBOOST_ROOT:STRING=/usr/local/boost_1_40_0

Change /usr/local/boost_1_40_0/ as necessary to match your installation. For further details, see Section 4.1, “Building Connector/C++ from Source on Unix, Solaris, and OS X” and Section 4.2, “Building Connector/C++ from Source on Windows”.