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 Connector/C++. Ideally, build your application with the same tools that were used to build the 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
Developers using Microsoft Windows must satisfy the following requirements:
Use a supported version of Visual Studio, either Visual Studio 2005 or Visual Studio 2008.
Ensure that your application uses the same runtime library as that used to build 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).
Your application should use the same linker configuration as
Connector/C++. For example, use one of
To use a variation of the requirements previously listed, such as a different compiler version, release configuration, or runtime library, compile 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 Connector/C++ itself.
A better solution that ensures compatibility is to build your 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.
Unpack the distribution archive into an appropriate directory. If you plan to use a dynamically linked version of Connector/C++, make sure that your system can reference the MySQL client library (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 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 (
.msi file): To use
the MSI Installer, launch it and follow the prompts in the
screens it presents to install Connector/C in the location of your
Zip archive without installer (
file): To use a Zip archive, unpack it in the directory where
you intend to install it using WinZip or
another tool that can read
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.
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.
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.