The C API documentation applies to Mac OS X. The "Building Client Programs" section explains the settings required to build a client application against libmysqlclient.
http://dev.mysql.com/doc/refman/5.1/en/c.html
I'm sorry that we can't really document the exact steps with every single IDE. Those for Xcode are not particularly different from any other IDE. Since you write that you can build in debug mode, am I correct in assuming that you already figured them out in principle?
The most likely reason why you can only build a debug executable is that in debug mode, Xcode will by default only build for your computer's architecture. In a release build, the default setting is to build a 32 bit universal binary that includes both intel and ppc code. However, in order to build a universal binary in one step, you need a universal client library, like the one that is contained in our universal binary downloads for Mac OS X. If you only got an intel- or ppc-specific distribution, you can't build a universal binary against the mysql client library contained in it. You can also download a distribution for intel and one for ppc and use the command-line utility lipo to create a universal mysql client library yourself.
If you only need one architecture, choose "Edit Project Settings" in the "Project Menu". Choose "All Configurations" in the configurations popup. Under "Architectures", you'll find an item "Build Active Architecture Only". There should be a check box with a dash in it next to it if you're still using Xcode's default. Check this box. Xcode will now only build the release configuration for your native architecture.
--
Daniel Fischer, MySQL Release Engineering
Oracle Corporation,
http://oss.oracle.com/