You should only need to install Connector/ODBC from source on Windows if you want to change or modify the source or installation. If you are unsure whether to install from source, please use the binary installation detailed in Section 20.1.3.1, “Installing Connector/ODBC from a Binary Distribution on Windows”.
Installing Connector/ODBC from source on Windows requires a number of different tools and packages:
MDAC, Microsoft Data Access SDK from http://support.microsoft.com/kb/110093.
Suitable C compiler, such as Microsoft Visual C++ or the C compiler included with Microsoft Visual Studio.
            Compatible make tool. Microsoft's
            nmake is used in the examples in this
            section.
          
MySQL client libraries and include files from MySQL 4.0.0 or higher. (Preferably MySQL 4.0.16 or higher). This is required because Connector/ODBC uses new calls and structures that exist only starting from this version of the library. To get the client libraries and include files, visit http://dev.mysql.com/downloads/.
          Connector/ODBC source distributions include
          Makefiles that require the
          nmake or other make
          utility. In the distribution, you can find
          Makefile for building the release version
          and Makefile_debug for building debugging
          versions of the driver libraries and DLLs.
        
To build the driver, use this procedure:
              Download and extract the sources to a folder, then change
              directory into that folder. The following command assumes
              the folder is named myodbc3-src:
            
C:\> cd myodbc3-src
              Edit Makefile to specify the correct
              path for the MySQL client libraries and header files. Then
              use the following commands to build and install the
              release version:
            
C:\>nmake -f MakefileC:\>nmake -f Makefile install
              nmake -f Makefile builds the release
              version of the driver and places the binaries in
              subdirectory called Release.
            
              nmake -f Makefile install installs
              (copies) the driver DLLs and libraries
              (myodbc3.dll,
              myodbc3.lib) to your system
              directory.
            
              To build the debug version, use
              Makefile_Debug rather than
              Makefile, as shown below:
            
C:\>nmake -f Makefile_debugC:\>nmake -f Makefile_debug install
You can clean and rebuild the driver by using:
C:\>nmake -f Makefile cleanC:\>nmake -f Makefile install
                Make sure to specify the correct MySQL client libraries
                and header files path in the Makefiles (set the
                MYSQL_LIB_PATH and
                MYSQL_INCLUDE_PATH variables). The
                default header file path is assumed to be
                C:\mysql\include. The default
                library path is assumed to be
                C:\mysql\lib\opt for release DLLs
                and C:\mysql\lib\debug for debug
                versions.
              
For the complete usage of nmake, visit http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vcce4/html/evgrfRunningNMAKE.asp.
                If you are using the Subversion tree for compiling, all
                Windows-specific Makefiles are
                named as Win_Makefile*.
              

User Comments
Add your own comment.