Gregg's instruction work for me, apart that I haven't put the linker flags -lm and -lz.
However, I fall into another trap some Xcoders might face as well, so here is my problem and the resolution:
I have installed the x86_64 version of a 5.0 MySQL server
and Xcode's build was complaining with the message:
"ld: warning in /usr/local/mysql/lib/libmysqlclient.dylib, file is not of required architecture"
So finally I got this link here:
http://goglobalgadget.com/2008/10/12/adventures-in-64-bit-xserve-installations/
And I ended up in doing the following:
- downloaded 32bit version of same MySQL server as tar ball
- deleted all files in /usr/local/mysql/lib
- copied all files from the tar ball's lib location into /usr/local/mysql/lib
Afterwards my Xcode was able to succeed in building (resp. linking the libs of the correct architecture).
Before I ended up wit this resolution I also tried to set the Xcode's project's target architecture from "Standard (32-bit Universal)" to "32/64-bit Universal", but it ended up in the same build error message.
Since I don't understand that much on such a system level, I only can guess that the 32/64-bit Universal architecture means creating a multiple-architecture-built and then I would understand it b/c at that point in time the lib folder only contained the 64bit versions.
So in order to realize multiple-architecture-builts the link above might give the right direction.
cheers
btw:
- Mac OS X 10.5.6
- Xcode 3.1.2
- mysql-5.0.67-osx10.5-x86_64.dmg
- mysql-5.0.67-osx10.5-x86.tar.gz
Edited 1 time(s). Last edit at 01/22/2009 06:29AM by .