Testing MyODBC on Unix
<<<
Mac OS X Notes HP-UX Notes
>>>

22.1.7 Installing MyODBC from a Source Distribution on Unix
22.1 Support ODBC de MySQL
22 Pilotes MySQL
 Manuel de Référence MySQL 4.1 : Version Française

Requirements
Typical 'configure' Options
Thread-Safe Client
Shared or Static Options
Enabling Debugging Information
Enabling the Documentation
Building and Compilation
Building Shared Libraries
Installing Driver Libraries
Testing MyODBC on Unix
->Mac OS X Notes
HP-UX Notes
Notes pour AIX :

22.1.7.11 Mac OS X Notes

To build the driver on Mac OS X (Darwin), make use of the following 'configure' example:


shell> ./configure --prefix=/usr/local
                   --with-unixODBC=/usr/local
                   --with-mysql-path=/usr/local/mysql
                   --disable-shared
                   --enable-gui=no
                   --host=powerpc-apple
The command assumes that the unixODBC and MySQL are installed in the default locations. If not, configure accordingly.

On Mac OS X, --enable-shared builds .dylib files by default. You can build .so files like this:


shell> make
shell> cd driver
shell> CC=/usr/bin/gcc \
       $CC -bundle -flat_namespace -undefined error
           -o .libs/libmyodbc3-3.51.01.so *.o
           -L/usr/local/mysql/lib/
           -L/usr/local/iodbc/lib
           -liodbcinst -lmysqlclient -lz -lc
To build the thread-safe driver library:

shell> CC=/usr/bin/gcc \
       $CC -bundle -flat_namespace -undefined error
       -o .libs/libmyodbc3-3.51.01.so *.o
       -L/usr/local/mysql/lib/
       -L/usr/local/iodbc/lib
       -liodbcinst -lmysqlclienti_r -lz -lc -lpthread
Make sure to change the -liodbcinst to -lodbcinst in case of using unixODBC instead of iODBC and configure the libraries path accordingly.In Apple's version of GCC, both 'cc' and 'gcc' are actually symbolic links to 'gcc3' .

Now copy this library to the $prefix/lib directory and symlink to libmyodbc3.so .

You can cross-check the output shared-library properties using this command:

shell> otool -LD .libs/libmyodbc3-3.51.01.so

<< Mac OS X Notes >>
Testing MyODBC on Unix Installing MyODBC from a Source Distribution on Unix HP-UX Notes