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

22.4.2. Installing MySQL Connector/C++ from a Binary Distribution

Caution

One problem that can occur is when the tools you use to build your application are not compatible with the tools used to build the binary versions of MySQL Connector/C++. Ideally, build your application with the same tools that were used to build the MySQL Connector/C++ binaries. To help with this, the following resources are provided.

All distributions include a README file that contains platform-specific notes. At the end of the README file contained in the binary distribution, you will find the settings used to build the binaries. If you experience build-related issues on a platform, it may help to check the settings used on the platform to build the binary.

Developers using Microsoft Windows must satisfy the following requirements:

  1. Use a supported version of Visual Studio, either Visual Studio 2005 or Visual Studio 2008.

  2. Ensure that your application uses the same runtime library as that used to build MySQL Connector/C++. Visual Studio 2005 builds use Microsoft.VC80.CRT (8.0.50727.762), and Visual Studio 2008 builds use Microsoft.VC90.CRT (9.0.21022.8).

  3. Your application should use the same linker configuration as MySQL Connector/C++. For example, use one of /MD, /MDd, /MT, or /MTd.

To use a variation of the requirements previously listed, such as a different compiler version, release configuration, or runtime library, compile MySQL Connector/C++ from source using your desired settings and ensure that your application is built using these same settings. To avoid issues, ensure that the three variables of compiler version, runtime library, and runtime linker configuration settings are the same for both application and MySQL Connector/C++ itself.

A better solution that ensures compatibility is to build your MySQL Connector/C++ libraries from the source code using the same tools that you use to build your application.

Downloading MySQL Connector/C++

Binary packages can be obtained from MySQL Connector/C++ downloads.

Archive Package

Unpack the distribution archive into an appropriate directory. If you plan to use a dynamically linked version of MySQL Connector/C++, make sure that your system can reference the MySQL client library (MySQL Connector/C++ is linked against and thus requires the MySQL client library). Consult your operating system documentation on how to modify and expand the search path for libraries. If you cannot modify the library search path, it may help to copy your application, the MySQL Connector/C++ library and the MySQL client library into the same directory. Most systems search for libraries in the current directory.

Windows users can choose between two binary packaging formats:

Windows MSI Installer

Using the MSI Installer may be the easiest solution. The MSI Installer does not require any administrative permissions as it simply copies files.

The MSI Installer begins by presenting a welcome screen.

Figure 22.70. MSI Installer Welcome Screen

MSI Installer Welcome Screen

The MSI Installer overview screen enables you to select the type of installation you want to perform. The "Typical" installation consists of all required header files and the Release libraries. The "Custom" installation enables you to install additional Debug versions of the connector libraries.

Figure 22.71. MSI Installer Overview Screen

MSI Installer Overview Screen

If you select a "Custom" installation, the MSI Installer presents a Custom Setup screen that enables you to select which features to install and where to install them.

Figure 22.72. MSI Installer Custom Setup Screen

MSI Installer Custom Setup Screen