Skip to Content.
Sympa Menu

freetds - [freetds] linking to libodbc in Xcode

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: TDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] linking to libodbc in Xcode
  • Date: Thu, 8 Feb 2007 01:11:37 -0500

I need a little help linking to the iODBC DM that comes with OS X. I'm
trying to test my new bsqlodbc utility against Sybase's driver to compare
behaviors. But I don't quite get how the linker gets its information.

I installed Sybase's ODBC driver on OS X. I added a user DSN. I
downloaded and installed Xcode. I created a new project called "bsqlodbc"
and brought in only that file from FreeTDS. It compiled without much
fuss.

Sybase's ODBC User Guide (aseodbc.pdf) says:

"The iODBC Driver Manager includes a dynamic library named
libiodbc.dylib,
typically located in the /usr/lib directory.
* Pass the -liodbc flag to the linker."

I do that in my project's linker properties: in "other linker flags" I put
"-liodbc". But I don't see that flag appear anywhere in the build log,
and the executable complains:

$ build/Debug/bsqlodbc -S $S -U $U -P $P
ZeroLink: unknown symbol '_SQLAllocHandle'
Abort trap

What am I doing wrong?

Many thanks.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page