MySQL Forums
Forum List  »  Source, Builds, Binaries

Re: MySQL C API and XCode Settings
Posted by: Daniel Fischer
Date: April 25, 2009 01:09AM

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/

Options: ReplyQuote


Subject
Views
Written By
Posted
12443
October 26, 2005 11:06AM
6448
November 02, 2005 04:54AM
5519
November 14, 2005 02:50AM
4318
February 25, 2006 06:35AM
3979
September 19, 2006 10:23AM
4138
September 25, 2006 03:51AM
46407
November 17, 2006 07:57PM
7717
January 22, 2009 06:22AM
4724
January 25, 2009 03:56PM
4420
April 24, 2009 12:12PM
Re: MySQL C API and XCode Settings
6440
April 25, 2009 01:09AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.