Installing MySQL Connector/C from Source
2128
3. Build the project:
shell>
make
4. As
root
, install the MySQL Connector/C headers, libraries, and utilities:
root-shell>
make install
20.4.5.2. Building MySQL Connector/C from Source on Microsoft Windows
MySQL Connector/C can be built on several versions of Microsoft Windows, listed in
Section 20.4.1,
“MySQL Connector/C Supported Platforms”
.
Microsoft Visual Studio 8 or 9 is recommended. The Express Edition of Visual Studio and other
compilers might work, but are untested.
You also need
CMake
2.6 or newer, which is available from
cmake.org
.
To build and install the source distribution, use the following procedure:
1. Set the environment variables for the Visual Studio toolchain. Visual Studio includes a batch file to
set these for you, and installs a shortcut in the Start menu to open a command prompt with these
variables set.
2. Change location to the top-level directory of the source distribution.
3. Generate the
Makefile
by entering the following command in a command-prompt window:
shell>
cmake -G "Visual Studio 9 2008"
For other
CMake
options that you might find useful, see
Section 20.4.5.3, “Other Build Options”
.
The result of the
cmake
command is a project (solution) file,
libmysql.sln
, that you can open
with Visual Studio. Alternatively, build from the command line with either of these commands:
shell>
devenv.com libmysql.sln /build Release
shell>
devenv.com libmysql.sln /build RelWithDebInfo
For other versions of Visual Studio or for an
nmake
-based build, use the following command to
check which generators can be specified with the
-G
option:
shell>
cmake --help
To compile a Debug build, you must set the
CMake
build type so the correct external library
versions are used, then compile using the
Debug
solution configuration:
shell>
cmake -G "Visual Studio 9 2008" -DCMAKE_BUILD_TYPE=Debug
shell>
devenv.com libmysql.sln /build Debug
A normal build builds the C API libraries for the
lib
directory. A Debug build additionally builds
debug libraries for the
lib/debug
directory. You must use the debug libraries when compiling
clients built using the debug C runtime.
4. Use the install operation provided by your development environment to install the MySQL
Connector/C headers, libraries, and utilities. You can also use this
CMake
command:
shell>
cmake --build . --target INSTALL --config RelWithDebInfo
20.4.5.3. Other Build Options
The following table shows other options that can be used when building MySQL Connector/C from
source.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...