Spec-Zone .ru
спецификации, руководства, описания, API

21.4.3. Installing MySQL Connector/C++ from Source

21.4.3.1. Building MySQL Connector/C++ from Source on Unix, Solaris, and Mac OS X
21.4.3.2. Building MySQL Connector/C++ from Source on Windows
21.4.3.3. Dynamically Linking MySQL 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 MySQL 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 MySQL Connector/C++ 1.1.0, the Boost C++ libraries 1.34.0 or newer must be installed. Boost is required only to build the connector, 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 21.4.3.1, "Building MySQL Connector/C++ from Source on Unix, Solaris, and Mac OS X" and Section 21.4.3.2, "Building MySQL Connector/C++ from Source on Windows".