• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Making use of a static library?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making use of a static library?


  • Subject: Re: Making use of a static library?
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 11 Jun 2008 18:48:43 -0600


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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Making use of a static library?
      • From: Graham Cox <email@hidden>
References: 
 >Making use of a static library? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Unvending a distributed object
  • Next by Date: Re: Accessible disks? Opinions requested.
  • Previous by thread: Making use of a static library?
  • Next by thread: Re: Making use of a static library?
  • Index(es):
    • Date
    • Thread