On Jun 11, 2008, at 6:29 PM, Graham Cox wrote:

I have a project which builds a static library from some pure C code. I want to use this library in another Cocoa project. I've set up the cross-project dependency and included the .a file in the Cocoa project. When the Cocoa project builds it complains (warning) that the library "file is not of required architecture". Is this referring to whether it's PPC/i386/universal? In the library project, the architecture build setting only offers me 32 bit or 64 bit, not i386/PPC.

What does the warning really mean and how should I fix it?


It means you're building the project target against a static library that is missing the requisite architecture. If, for example, you're building a project for x86_64, then _all_ libraries you link the project to _must_ include an x86_64 build. You can use "lipo -info" to find out the architectures supported by a binary.

More likely than not, you're trying to build a traditional 2-way universal binary against a PPC-only library, or a 4-way universal binary against a PPC-only or 32-bit-only library. To fix it, you either need to drop application support for the unsupported architectures, or if possible, recompile the library with support for the unsupported architectures.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to