Documentation Home
MySQL Connector/C++ Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 249.4Kb
PDF (A4) - 253.0Kb
HTML Download (TGZ) - 52.4Kb
HTML Download (Zip) - 66.7Kb


MySQL Connector/C++ Developer Guide  /  Installing Connector/C++ from Source  /  Obtaining and Unpacking a Connector/C++ Source Distribution

4.2 Obtaining and Unpacking a Connector/C++ Source Distribution

To obtain a Connector/C++ source distribution, visit the Connector/C++ downloads page. Alternatively, clone the Connector/C++ Git source repository.

A Connector/C++ source distribution is packaged as a compressed tar file or Zip archive, denoted here as PACKAGE.tar.gz or PACKAGE.zip. A source distribution in tar file or Zip archive format can be used on any supported platform.

To unpack a compressed tar file, use this command in the intended installation directory:

tar zxvf PACKAGE.tar.gz

After unpacking the distribution, build it using the appropriate instructions for your platform later in this chapter.

To install from a Zip archive package (.zip file), use WinZip or another tool that can read .zip files to unpack the file into the location of your choosing. After unpacking the distribution, build it using the appropriate instructions for your platform later in this chapter.

To clone the Connector/C++ code from the source code repository located on GitHub at https://github.com/mysql/mysql-connector-cpp, use this command:

git clone https://github.com/mysql/mysql-connector-cpp.git

That command should create a mysql-connector-cpp directory containing a copy of the entire Connector/C++ source tree.

The git clone command sets the sources to the master branch, which is the branch that contains the latest sources. Released code is in the 8.0 and 1.1 branches (the 8.0 branch contains the same sources as the master branch). If necessary, use git checkout in the source directory to select the desired branch. For example, to build Connector/C++ 8.0:

cd mysql-connector-cpp
git checkout 8.0

Or to build Connector/C++ 1.1:

cd mysql-connector-cpp
git checkout 1.1

After cloning the repository, build it using the appropriate instructions for your platform later in this chapter.

After the initial checkout operation to get the source tree, run git pull periodically to update your source to the latest version.


User Comments
Sign Up Login You must be logged in to post a comment.