~mysql/myodbc/5.2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
+-------------------------------------------------------------+
| MySQL Connector/ODBC                                        |
| Build on Microsoft Windows                                  |
+-------------------------------------------------------------+

WHAT YOU NEED
---------------------------------------------------------------

Windows

  ODBC has been a standard part of Windows since 3.1 but we do
  not build for very old versions of Windows. Consider building 
  on and for Windows XP or newer. Windows 2000 should be fine also.

Compiler Tools

  We regularly build using Microsoft Visual Studio 7 and 8.
  Other compilers may work, but are untested.

  You also need CMake 2.4,

    http://www.cmake.org

Source Code

  The source code is the main thing. You can get it from the 
  source repository if you want the 'bleeding edge' code but most
  people will simply download the zip of the source.
        
MySQL

  We usually build with the latest stable release of MySQL - 
  using a static client lib and other development files.   


BUILD
---------------------------------------------------------------

You need to have the environment variables set for the Visual Studio
toolchain. Visual Studio includes a batch file to set these for you,
and installs a shortcut into the Start menu to open a command prompt
with these variables set.

You need to set MYSQL_INCLUDE_DIR, MYSQL_LIB_DIR or MYSQL_DIR to point
to where the MySQL server is installed, using the short-style filenames:

  set MYSQL_INCLUDE_DIR=C:\PROGRA~1\MySQL\MYSQLS~1.0\include
  set MYSQL_LIB_DIR=C:\PROGRA~1\MySQL\MYSQLS~1.0\lib
  set MYSQL_DIR=C:\PROGRA~1\MySQL\MYSQLS~1.0
 
Mysql client library(mysqlclient.lib) is build statically with 
MyODBC. If you want to build dynamically or want to specify mysql client 
library name with which MyODBC should get linked, use MYSQLCLIENT_LIB_NAME 
additional parameter with mysqlclient library name.

 -DMYSQLCLIENT_LIB_NAME=mysqlclient lib name with extension
 
If you want to enable C++ linkage to mysql client library, then specify 
MYSQL_CXX_LINKAGE to true. By default, MYSQL_CXX_LINKAGE is enabled for 
mysql version greater then equal to 5.6.4
 -DMYSQL_CXX_LINKAGE=1

Build Connector/ODBC using the "cmake" command-line tool by doing the
following from the source root directory (in a command prompt window);

  cmake -G "Visual Studio 8 2005"

This produces a project file that you can open with Visual Studio or
build from the command line with either of:

  devenv.com MySQL_Connector_ODBC.sln /build Release
  devenv.com MySQL_Connector_ODBC.sln /build RelWithDebInfo

To compile the "Debug" build, you must run set the cmake build type so
the correct version of the MySQL client libraries are used:

  cmake -G "Visual Studio 8 2005" -DCMAKE_BUILD_TYPE=Debug
  devenv.com MySQL_Connector_ODBC.sln /build Debug

Upon completion; you will find the executables in the subdirectories of the
"bin" and "lib" directories.

INSTALL
---------------------------------------------------------------

Before installing over an existing installation, run the Uninstall.bat
script.

To install, execute the Install.bat script to copy the files to your system
directory and to register the driver.

NOTE: The uninstall script does not actually honour the usage count - it
will remove the files regardless of the value of the usage counter.

See the INSTALL file for more details.