22.5.1. MySQL Connector/C++ Binary Installation

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 you need to 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 contain a README file, which 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 need to ensure they meet 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 run time 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, /MTd.

If you wish to use a variation of the requirements previously listed, such as a different compiler version, release configuration, or run time library, you must compile MySQL Connector/C++ from source using your desired settings, and then ensure that your application is built with these same settings. The three variables of compiler version, run time library, and run time linker configuration settings should always be the same for both application and MySQL Connector/C++ itself, in order to avoid issues.

For your convenience the same information, but more frequently updated, can be found on the MySQL Forge site.

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

Downloading MySQL Connector/C++

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

Archive Package

Unpack the 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. Consult your operating system documentation on how do modify and expand the search path for libraries. In case 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 MSI Installer

Windows users can choose between two binary packages:

  1. Without installer (unzip in C:\)

  2. Windows MSI Installer (x86)

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

Figure 22.59. Windows Installer Welcome Screen

Windows Installer Welcome Screen

Figure 22.60. Windows Installer Overview Screen

Windows Installer Overview Screen

The “Typical” installation consists of all required header files and the Release libraries. The only available “Custom” installation option enables you to install additional Debug versions of the connector libraries.

Figure 22.61. Windows Installer Custom Setup Screen

Windows Installer Custom Setup
          Screen
Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout