Hugh –


Again, I really appreciate your help.


I did install iodbc using the dmg package from the iodbc downloads page


I am trying a different track. I want to ensure that iODBC is working properly before worrying about ruby-odbc.


I used the OpenLink ODBC Adminstrator to set up  a driver referencing FreeTDS.


This is my freetds.conf file


host =

instance = MACBOOKPRO

tds version = 8.0


 I then added a DSN that references the FreeTDS driver.


This created an entry in my odbc.ini file in /Library/ODBC/


It looks like this

[ODBC Data Sources]




Driver     = /usr/local/lib/

Database   = ian_dev


Trace      = No


I noticed that my odbcinst.ini file is empty, so it is not clear to me where the driver information set up in the ODBC Admin tool is being stored. Should it be empty?


Using the ODBC Manager, I selected the dsn, and clicked the Test button, entered a username and password, and was told the “specified driver could not be loaded”. I clicked OK and was told:

Dlopen(/usr/ocal/lib/, 6): no suitable image found. Did Find: /user/local/lib/ mack-o, but wrong architecture


When I try to test using the command line tool iodbctest, it lists the dsn with the FreeTDS driver, but I get the following error:

1: SQLDriverConnect = [iODBC][Driver Manager]dlopen(/usr/local/lib/, 6): Symbol not found: _CreateDataSource

  Referenced from: /usr/lib/libiodbcinst.2.dylib

  Expected in: flat namespace

 (0) SQLSTATE=00000

2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be loaded (0) SQLSTATE=IM003


This is surprising, as I am not sure why the iodbctest tool is using the older version of the dylib.


Would you be willing to provide any insights into what might be happening, and why I cannot get iODBC to work.


I was thinking I should uninstall iodbc entirely, then reinstall it from the dmg package. Does this make sense? If so, how would I go about ensuring that all iODBC references were uninstalled?


Is there something else I should try?


Any advice is greatly appreciated. I am now at a complete loss, having spent the better part of 3 days trying to get this to work.




From: Hugh Williams []
Sent: Wednesday, August 18, 2010 1:32 PM
To: Tom Hoen
Subject: Re: [Iodbc-macosx] lazy symbol binding failed: Symbol not found: _Init_iODBC error. Any help would be greatly appreciated


Hi Tom,


I note the symbol not found error you report still references /usr/lib/libiodbc2.dylib, which is the location of the Apple bundle iODBC Driver Manager, alhtough you indicated having downloaded the latest iODBC from the web site,  by which I presume you mean ? As these updated installers from OpenLink Software do not install the iODBC Driver Manager in the same location as Apples, but rather /usr/local/iODBC (as is the norm on Unix systems) which is a symlink from the Framework based libraries we provide for Mac OS X:



$ ls -ltr /usr/local/iODBC/lib

total 16

lrwxr-xr-x  1 root  wheel  50 11 Aug 01:07 libiodbcinst.dylib -> //Library/Frameworks/iODBCinst.framework/iODBCinst

lrwxr-xr-x  1 root  wheel  42 11 Aug 01:07 libiodbc.dylib -> //Library/Frameworks/iODBC.framework/iODBC


So your build script should be referencing the iODBC libraries from either of these locations to use the latest iODBC Driver Manager, as detailed at:




I hope this helps ...


Best Regards

Hugh Williams

Professional Services

OpenLink Software



On 17 Aug 2010, at 22:36, Tom Hoen wrote:

I am working on a Rails application that has to connect to a MSSQL database. I am developing the application on a Mac running Snow Leopard.


I have set up freetds and successfully connected to the database using tsql.


I have set up my odbc.ini and odbcinst.ini according to the most recent documentation.


However, when the Rails app attempts to connect to the database, I get the following error:

dyld: lazy symbol binding failed: Symbol not found: _Init_iODBC

  Referenced from: /usr/lib/libiodbc.2.dylib

  Expected in: flat namespace


dyld: Symbol not found: _Init_iODBC

  Referenced from: /usr/lib/libiodbc.2.dylib

  Expected in: flat namespace


I have installed the most recent version of iODBC from the site, and I have installed the OSX patch (I get the same error with the patch installed and prior to installing the patch).


I have also tried several different installs of ruby-odbc, thinking that this is related, but I get the same results.


Any ideas you may on how I can fix this or further trouble shoot would be greatly appreciated.



This email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge _______________________________________________
Iodbc-macosx mailing list


No virus found in this incoming message.
Checked by AVG -
Version: 9.0.851 / Virus Database: 271.1.1/3077 - Release Date: 08/17/10 02:35:00