Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 11-12-2006, 09:46 AM   #1
zellpharm
Prospect
 
Join Date: Jan 2002
Posts: 8
Compiling myodbc driver on Intel Mac

Have a need to tie in some FileMaker work to a Mysql database and I see there is no myodbc driver that's either compiled for Intel Macs or a universal one. I had it working fine on a PPC iMac however using the one from the mysql website.

I've tried compiling some scratch using the following configure lines and I get a good configure script it fails soon after a make command:

./configure --prefix=/usr/local
--with-iODBC=/usr
--with-mysql-path=/usr/local/mysql
--disable-shared
--enable-gui=no
--host=i686-apple-darwin8.8.1

Error message after a make:
In file included from MYODBCUtilAllocDataSource.c:21:
MYODBCUtil.h:43:22: error: odbcinst.h: No such file or directory
make[1]: *** [MYODBCUtilAllocDataSource.lo] Error 1
make: *** [all-recursive] Error 1

Has anyone been able to get this to compile? I'm not an expert at troubleshooting the compiling process so any help would be appreciated. Thanks!
zellpharm is offline   Reply With Quote
Old 11-12-2006, 10:01 AM   #2
zellpharm
Prospect
 
Join Date: Jan 2002
Posts: 8
OK, i've been able to get a compile by copying the /Developer/SDKs/MacOSX10.4u.sdk/usr/include/iodbcinst.h to /usr/include/odbcinst.h
I get lots of errors when I run make but a "make test" does manage to connect to my mysql DB running locally using the usual "test" database.
Since it seems to connect I tried using ODBC Administator.app to make a new driver listing but to no avail.
Any ideas?

Last edited by zellpharm; 11-12-2006 at 10:12 AM.
zellpharm is offline   Reply With Quote
Old 11-12-2006, 10:23 AM   #3
Photek
Hall of Famer
 
Join Date: Feb 2005
Location: Warwick, UK
Posts: 4,835
are any of these any good?

http://www.macupdate.com/search.php?...x=0&button.y=0

bearing in mind I know nothing about connecting to databases or about compliling apps!
Photek is offline   Reply With Quote
Old 11-12-2006, 10:39 AM   #4
zellpharm
Prospect
 
Join Date: Jan 2002
Posts: 8
Why buy something when we can use the opensource one provided? We just need a couple of programmer types to help sort out the issues and we'll have a free working solution!
zellpharm is offline   Reply With Quote
Old 12-02-2006, 04:45 PM   #5
dotwats
Prospect
 
Join Date: Dec 2006
Posts: 25
There is a file in the distribution called README.osx that helps with figuring out proper options to configure with. Then you need to go into a few files and modify them to use iODBC instead of ODBC. This should allow you to make the project and install. Then you can use the ODBC Administrator to add the driver which is called libmyodbc3.so (I believe). I did this and created a user DSN and FileMaker Pro 8.5 was able to access MySQL data.

./configure --prefix=/usr/local/myodbc --with-iODBC=/usr --with-iODBC-includes=/usr/include --with-ldflags=-lltdl --without-samples --disable-gui --disable-test --enable-bundles --enable-myodbcinst --enable-imyodbc


========================
util/MYODBCUtil.h

line 43
#include <odbcinst.h> >>>> #include <iodbcinst.h>

========================
driver/myodbc3.h

line 104
#include <odbcinst.h> >>>> #include <iodbcinst.h>

========================
myodbcinst/myodbcinst.c

line 59
#include <odbcinst.h> >>>> #include <iodbcinst.h>
dotwats is offline   Reply With Quote
Old 12-04-2006, 10:47 AM   #6
zellpharm
Prospect
 
Join Date: Jan 2002
Posts: 8
Thanks for the tip, it worked!!
zellpharm is offline   Reply With Quote
Old 12-04-2006, 02:56 PM   #7
demosoftmac
Registered User
 
Join Date: Dec 2006
Posts: 1
Test it ?

Dear,

I read that you managed to compile the ODBC driver for Intel Mac's. Yeah !

Could I test it for my own use ? I'm looking for this since I bought a new Mac recently. You can mail me at demosoftmac[at]hotmail[dot]fr

That would be a great help !
demosoftmac is offline   Reply With Quote
Old 12-07-2006, 10:09 PM   #8
zellpharm
Prospect
 
Join Date: Jan 2002
Posts: 8
I've created a video tutorial on how to compile myOBDC on an Intel Mac. You can watch it here on my website:

http://www.graphiccare.ca/index.php?...d=56&Itemid=37
zellpharm is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:16 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.