Skip to content

Commit 6e361b1

Browse files
author
Bogdan Degtyariov
committed
Documentation and copyright fixes
1 parent fb68ca1 commit 6e361b1

File tree

9 files changed

+26
-856
lines changed

9 files changed

+26
-856
lines changed

BUILD.unix

Lines changed: 3 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,4 @@
1-
+-------------------------------------------------------------+
2-
| Connector/ODBC |
3-
| UNIX Platforms |
4-
+-------------------------------------------------------------+
1+
You can find information about building MySQL ODBC Driver for
2+
Linux/Unix systems at:
53

6-
INTRODUCTION
7-
---------------------------------------------------------------
8-
9-
In this document, we provide a general and brief explaination
10-
of how to build the MyODBC driver on UNIX platforms.
11-
12-
NOTE: This information is fairly generic. You may find other
13-
README files with more detailed information about building
14-
MyODBC with specific flavours of UNIX.
15-
16-
WHAT YOU NEED
17-
---------------------------------------------------------------
18-
19-
UNIX
20-
----
21-
22-
UNIX or a UNIX-like operating system such as;
23-
24-
- Solaris
25-
- Linux
26-
- OSX
27-
28-
ODBC
29-
----
30-
31-
You need an ODBC SDK, and you probably want an ODBC Driver
32-
Manager.
33-
34-
ODBC has not, traditionally, been a standard part of any UNIX
35-
or UNIX-like platform. This causes a number of vendors to
36-
provide ODBC solutions which can be added to UNIX. In theory
37-
this should not be a problem, but in practice this can cause
38-
compatability and portability issues.
39-
40-
Recently; Linux distributions have been including unixODBC as a
41-
standard option, and Apple OSX now has ODBC by default.
42-
43-
We recommend, and use, unixODBC on all UNIX-like platforms
44-
except OSX where we use the default ODBC.
45-
46-
See:
47-
http://www.unixodbc.org/
48-
49-
Compiler Tools
50-
--------------
51-
52-
We try to build using the native compiler tool set for the
53-
target platform. For example, this is SunStudio on Solaris. But
54-
the GNU tool-chain is a common compiler that works across all
55-
platforms.
56-
57-
Source Code
58-
-----------
59-
60-
You can get the source code from the git source repository (for
61-
'bleeding edge' code) or more commonly, simply download the zip
62-
or tarball of the source.
63-
64-
Source:
65-
git clone https://github.com/mysql/mysql-connector-odbc.git <local_dir>
66-
https://github.com/mysql/mysql-connector-odbc
67-
68-
Downloads:
69-
http://dev.mysql.com/downloads/connector/odbc/
70-
71-
BUILD
72-
---------------------------------------------------------------
73-
74-
cmake
75-
-------------
76-
77-
CMake is the build system used to create configure files for your
78-
system. Instructions are as follows:
79-
80-
cd into the MyODBC source directory, then run cmake. For example:
81-
82-
$ cd /path/to/myodbc/source
83-
$ cmake -G "Unix Makefiles" .
84-
85-
CMake will look for iODBC by default. Alternatively, if you are using
86-
unixODBC instead of iODBC, then you'll need to pass in the appropriate
87-
parameter, such as:
88-
89-
$ cmake -G "Unix Makefiles" -DWITH_UNIXODBC=1
90-
91-
If the driver manager headers and/or libraries cannot be found, then you
92-
may specify their location by passing in these additional parameters:
93-
94-
-DODBC_INCLUDES=/path/to/headers
95-
-DODBC_LIB_DIR=/path/to/libs
96-
97-
Some driver managers such as iODBC might keep the ODBCINST headers and
98-
libraries in a separate directory. To address this possibility there
99-
are two more parameters:
100-
101-
-DODBCINST_INCLUDES=/path/to/odbcinst_headers
102-
-DODBCINST_LIB_DIR=/path/to/odbcinst_library
103-
104-
And you might need to help cmake find the MySQL headers and libraries,
105-
by setting the environment variable or additional parameters
106-
MYSQL_INCLUDE_DIR, MYSQL_LIB_DIR or MYSQL_DIR to the appropriate location.
107-
For example:
108-
109-
$ export MYSQL_INCLUDE_DIR=/usr/local/mysql/include
110-
$ export MYSQL_LIB_DIR=/usr/local/mysql/lib
111-
$ export MYSQL_DIR=/usr/local/mysql
112-
113-
Mysql client library(libmysqlclient.a) is build statically with
114-
MyODBC. If you want to build dynamically or want to specify mysql client
115-
library name with which MyODBC should get linked, use MYSQLCLIENT_LIB_NAME
116-
additional parameter with mysqlclient library name.
117-
118-
-DMYSQLCLIENT_LIB_NAME=mysqlclient lib name with extension
119-
120-
In MyODBC, mysql_config is used to find MYSQL_INCLUDE_DIR, MYSQL_LIB_DIR,
121-
MYSQL_LINK_FLAGS and MYSQL_CXXFLAGS each of which can be overriden if they
122-
are provided as additional parameters in cmake. mysql_config location can
123-
be specified using MYSQL_CONFIG_EXECUTABLE additional parameter.
124-
125-
-DMYSQL_CONFIG_EXECUTABLE=/path/to/mysql_config
126-
-DMYSQL_LINK_FLAGS=mysql link flags
127-
-DMYSQL_CXXFLAGS=mysql C++ linkage flags
128-
129-
If you want to enable C++ linkage to mysql client library, then specify
130-
MYSQL_CXX_LINKAGE to true. By default, MYSQL_CXX_LINKAGE is enabled for
131-
mysql version greater then equal to 5.6.4
132-
-DMYSQL_CXX_LINKAGE=1
133-
134-
Upon success, CMake will create the appropriate make files. Then,
135-
execute make:
136-
137-
$ make
138-
139-
INSTALL
140-
---------------------------------------------------------------
141-
142-
You probably want to be the root user, or use sudo, because installation
143-
will probably require these extra privileges. To install the MyODBC
144-
library and tools, execute one of the following:
145-
146-
$ sudo make install
147-
# make install
148-
149-
That will copy all of the MyODBC files to their appropriate locations.
150-
151-
Next, you probably want to register the driver with the ODBC on your
152-
system. See your ODBC documentation for more about how to do this.
153-
154-
For unixODBC, you could run ODBCConfig from a GUI as root, or use the
155-
odbcinst command line tool. You may also want to look at the
156-
myodbc-installer command-line tool for this.
4+
https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-installation-source-unix.html

BUILD.win

Lines changed: 2 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,3 @@
1-
+-------------------------------------------------------------+
2-
| MySQL Connector/ODBC |
3-
| Build on Microsoft Windows |
4-
+-------------------------------------------------------------+
1+
You can find information about building MySQL ODBC Driver for Windows at:
52

6-
WHAT YOU NEED
7-
---------------------------------------------------------------
8-
9-
Windows
10-
11-
ODBC has been a standard part of Windows since 3.1 but we do
12-
not build for very old versions of Windows. Consider building
13-
on and for Windows XP or newer. Windows 2000 should be fine also.
14-
15-
Compiler Tools
16-
17-
We regularly build using Microsoft Visual Studio 7 and 8.
18-
Other compilers may work, but are untested.
19-
20-
You also need CMake 2.4,
21-
22-
http://www.cmake.org
23-
24-
Source Code
25-
26-
The source code is the main thing. You can get it from the
27-
source repository if you want the 'bleeding edge' code but most
28-
people will simply download the zip of the source.
29-
30-
MySQL
31-
32-
We usually build with the latest stable release of MySQL -
33-
using a static client lib and other development files.
34-
35-
36-
BUILD
37-
---------------------------------------------------------------
38-
39-
You need to have the environment variables set for the Visual Studio
40-
toolchain. Visual Studio includes a batch file to set these for you,
41-
and installs a shortcut into the Start menu to open a command prompt
42-
with these variables set.
43-
44-
You need to set MYSQL_INCLUDE_DIR, MYSQL_LIB_DIR or MYSQL_DIR to point
45-
to where the MySQL server is installed, using the short-style filenames:
46-
47-
set MYSQL_INCLUDE_DIR=C:\PROGRA~1\MySQL\MYSQLS~1.0\include
48-
set MYSQL_LIB_DIR=C:\PROGRA~1\MySQL\MYSQLS~1.0\lib
49-
set MYSQL_DIR=C:\PROGRA~1\MySQL\MYSQLS~1.0
50-
51-
Mysql client library(mysqlclient.lib) is build statically with
52-
MyODBC. If you want to build dynamically or want to specify mysql client
53-
library name with which MyODBC should get linked, use MYSQLCLIENT_LIB_NAME
54-
additional parameter with mysqlclient library name.
55-
56-
-DMYSQLCLIENT_LIB_NAME=mysqlclient lib name with extension
57-
58-
If you want to enable C++ linkage to mysql client library, then specify
59-
MYSQL_CXX_LINKAGE to true. By default, MYSQL_CXX_LINKAGE is enabled for
60-
mysql version greater then equal to 5.6.4
61-
-DMYSQL_CXX_LINKAGE=1
62-
63-
Build Connector/ODBC using the "cmake" command-line tool by doing the
64-
following from the source root directory (in a command prompt window);
65-
66-
cmake -G "Visual Studio 12"
67-
68-
This produces a project file that you can open with Visual Studio or
69-
build from the command line with either of:
70-
71-
devenv.com MySQL_Connector_ODBC.sln /build Release
72-
devenv.com MySQL_Connector_ODBC.sln /build RelWithDebInfo
73-
74-
To compile the "Debug" build, you must run set the cmake build type so
75-
the correct version of the MySQL client libraries are used:
76-
77-
cmake -G "Visual Studio 8 2005" -DCMAKE_BUILD_TYPE=Debug
78-
devenv.com MySQL_Connector_ODBC.sln /build Debug
79-
80-
Upon completion; you will find the executables in the subdirectories of the
81-
"bin" and "lib" directories.
82-
83-
INSTALL
84-
---------------------------------------------------------------
85-
86-
Before installing over an existing installation, run the Uninstall.bat
87-
script.
88-
89-
To install, execute the Install.bat script to copy the files to your system
90-
directory and to register the driver.
91-
92-
NOTE: The uninstall script does not actually honour the usage count - it
93-
will remove the files regardless of the value of the usage counter.
94-
95-
See the INSTALL file for more details.
3+
https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-installation-source-windows.html

0 commit comments

Comments
 (0)