Skip to Content.
Sympa Menu

freetds - Re: [freetds] linking to libodbc in Xcode

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Daniel Fazekas <fdsubs AT t-online.hu>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] linking to libodbc in Xcode
  • Date: Thu, 8 Feb 2007 08:14:58 +0100


On Feb 8, 2007, at 07:11, James K. Lowden wrote:

"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

In Xcode, instead of doing that, try going to the project viewer window and add it into the first section in Groups & Files.
Right alongside where your source .c file is also listed, although you might want to make another subfolder there, like, say "Libraries."

Then you just right-click (or Ctrl-click) and Add - Existing Files….
Press Command-Shift-G and jump to /usr/lib, then select libiodbc.dylib there.

That should do it. Don't forget to remove the -liconv you added to linker flags. (By the way, that too should have worked, but only if you switched your project to Release, which doesn't have ZeroLink turned on like Debug does.)

--
fds



Archive powered by MHonArc 2.6.24.

Top of Page