File: INSTALL-WIN-SOURCE

package info (click to toggle)
myodbc 3.51.09-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,400 kB
  • ctags: 1,596
  • sloc: ansic: 29,806; sh: 10,765; cpp: 627; makefile: 610
file content (220 lines) | stat: -rwxr-xr-x 8,223 bytes parent folder | download
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#########################################################
#                                                       #
#     HOWTO : INSTALL Connector/ODBC FROM SOURCE        #
#                   WINDOWS PORT                        #
#                                                       #  
#           Copyright (C) MySQL AB 1995-2003            #
#########################################################

This is a simple 'HOWTO' document describing how to
build Connector/ODBC 3.51 and 3.52 on Windows. 

Instructions are provided for building binaries
from a standard source distribution or from the BitKeeper
tree that contains the latest developer source.

---------------------------------------------------------
NOTE
---------------------------------------------------------

Normally, it is best to use precompiled binary distributions
of Connector/ODBC that are built specifically for optimal 
performance on Windows by MySQL AB.  Binary distributions 
are available from:

http://www.mysql.com/downloads/

The instructions in this document are strictly for users
who want to test MySQL on Windows from the latest source or
from the BitKeeper tree, and for internal MySQL developers.

--------------------------------------------------------
TABLE OF CONTENTS
--------------------------------------------------------
1. REQUIREMENTS
2. OBTAINING A WINDOWS SOURCE DISTRIBUTION
3. CREATING A SOURCE PACKAGE FROM THE 'BitKeeper' TREE
4. BUILDING 'Connector/ODBC' FROM VC++ WORKSPACE
5. BUILDING FROM 'nmake' MAKEFILES
6. TESTING THE DRIVER
7. SPECIAL NOTES AND CONSIDERATIONS

-------------------------------------------------------
1. REQUIREMENTS
-------------------------------------------------------

To build Connector/ODBC on Windows from source, you need the
following compiler and resources available on your Windows
system:

   - Microsoft Visual C++ 6.0 and above
   - ~1 MB disk space
   - 32 MB RAM
   - MySQL Client headers and libraries
   - Pre installation of binary packaged version of driver 
     from the normal distribution (atleast you need to do 
     this inorder to register the driver dlls and libs with 
     registry), so that the dlls that you built can replace 
     the older ones and can easily be loaded.
      
     For Connector/ODBC 3.52, you need the older 3.51 
     installed as they share the same dll and library names
     along side with driver name as 'MySQL ODBC 3.51 Driver'.

     You can get the binary package from:
     http://www.mysql.com/downloads/api-myodbc-3.51.html

You'll also need a Connector/ODBC source distribution.  You 
can get the source for released versions of Connector/ODBC 
from:

http://www.mysql.com/downloads/api-myodbc-3.52.html

Or you can also build it from the 'BitKeeper' tree directly 
by installing 'BitKeeper' (http://www.bitkeeper.com).

-------------------------------------------------------
2. OBTAINING A WINDOWS SOURCE DISTRIBUTION
-------------------------------------------------------

There are two ways you can get a Windows source distribution for 
Connector/ODBC version 3.51 and above:

 I.  Obtain a MySQL AB-distributed source distribution for the
     particular version of Connector/ODBC in which you are 
     interested.
     
     Prepackaged source distributions are available for released
     versions of Connector/ODBC and can be obtained from:
     
     Connector/ODBC 3.52 (development):
     http://www.mysql.com/downloads/api-myodbc-3.52.html
     
     Connector/ODBC 3.51 (stable):
     http://www.mysql.com/downloads/api-myodbc-3.51.html

 II. Directly work from the latest development 
     'BitKeeper' source tree.

If you are using the first option, you can skip the  next
section and go directly to 'BUILDING FROM VC++ WORKSPACE'.

-------------------------------------------------------
3. BUILDING FROM 'BitKeeper' TREE
-------------------------------------------------------

To build the Connector/ODBC on Windows, Please follow the 
following instructions below:

- Clone the BitKeeper source tree ('myodbc-3.52' for 
  Connector/ODBC 3.52 and 'myodbc-3.51' for Connector/ODBC
  3.51). For more information on how to clone the BitKeeper 
  source tree, follow the instructions at:
  
  http://www.mysql.com/products/myodbc/faq_2.html#Development_source
  
  Here is the initial clone command for Connector/ODBC 3.52:  
  
  command> bk clone bk://mysql.bkbits.net/myodbc-3.52 connector-odbc-3.52

- Once the 'BitKeeper' tree is cloned, checkout all files for 
  editing using bk -r edit and follow the next steps to build it 
  using VC++ workspace files or 'nmake' Makefiles.

- Also, if you are using the Connector/ODBC 3.52 on 
  non-Windows platform through the 'BitKeeper', then you can 
  generate the latest Windows snapshot using the 
  'make_win_src_distribution' script located from 'scripts' 
  sub-directory, which is actually used to create the offical 
  Windows source distribution package.

  shell> BUILD/compile-pentium
  shell> <should build the driver, samples, test library>
  shell> scripts/make_win_src_distribution
  shell> <copy or upload the resulted ' connector-odbc-3.52.00.zip'
          to your windows directories.>
  
---------------------------------------------------------
4. BUILDING 'Connector/ODBC'  FROM VC++ WORKSPACE
---------------------------------------------------------

NOTE: Connector/ODBC 3.51 and 3.52 and above VC++ workspace files 
      are compatible with Microsoft Visual Studio 6.0 and above
      (7.0/.NET) editions and tested by MySQL folks before each 
      release.

Unpack the Windows source zipped archive to a folder and open 
Connector352.dsw from 'win32'.

If you want to build both release and debug versions, then
select 'build' -> 'buildall' option. To build only 'release'
or 'debug' versions, then select all appropriate workspaces
from the 'build' -> 'batch build' option.

Now you have built the driver by yourself on Windows !!!

If you get any compiler errors, please cross check and send 
the compiler output to myodbc@lists.mysql.com for further 
assistance.

NOTE: Note that, by default the VC++ workspace builds and 
      copies the driver libraries directly to your system 
      directory by detecting the SYSDIR.

---------------------------------------------------------
5. BUILDING FROM 'nmake' MAKEFILES
---------------------------------------------------------
Make use of 'Makefile' or 'Makefile_debug' from 'win32' 
sub-directy which are 'nmake' compatible to build both 
'release' and 'debug' versions respectively.

  command> cd connector-odbc-3.52
  command> cd win32
  
  <win32 directory contains all windows releated files>
   
  command> edit Makefile.ini 
   
  <and adjust your build environment>
          
  command> nmake -f Makefile 
  
  <which actually builds the driver and keeps the 
   driver library and dll in its respective output 
   directory as specified in Makefile.ini, defaults 
   are 'Release' in case release 'Makefile' is used 
   else 'Debug' for 'Makefile_debug'>
  
  command> nmake -f Makefile install 
  
  <to install driver to system directory>

Note: Make sure to edit and set the 'Makefile.ini' 
      inorder to set the MySQL path and other compiler 
      related information, which is by default set to 
      Microsoft 'VC++' compiler ('cl') and MySQL 
      path defaulted to 'c:\mysql'.

---------------------------------------------------------
6. TESTING THE DRIVER
---------------------------------------------------------

Once the driver is installed, configure the DSN and click 
on 'Test DataSource' button from the DSN configuration 
Window. (Note that first time, you might need to use the 
installer to register the driver with the system).

---------------------------------------------------------
8. SPECIAL NOTES AND CONSIDERATIONS
---------------------------------------------------------

- For production use, MySQL AB does not advise using a 
  Connector/ODBC built by yourself from source. Instead, 
  stick to binaries shipped by MySQL AB.

- If you find something not working as expected, or you have
  suggestions about ways to improve the current build process
  on Windows, please email to 'myodbclists.mysql.com'.

Thanks
Venu