[freetds] linking to libodbc in Xcode

Daniel Fazekas fdsubs at t-online.hu
Thu Feb 8 02:14:58 EST 2007


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


More information about the FreeTDS mailing list