• 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
Dead stripping of Cocoa classes from static libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dead stripping of Cocoa classes from static libraries


  • Subject: Dead stripping of Cocoa classes from static libraries
  • From: Kai <email@hidden>
  • Date: Thu, 27 Mar 2008 16:08:03 +0100

I am working on a project which uses static libraries for structuring. The final application links against the static libraries.

One of these static libraries includes some Cocoa classes. This works nicely, as long as these classes are referenced by code in the final application. But if a class is not referenced explicitly, it seems to be stripped away be the linker. My case is a class which is instantiated via a nib and never explicitly referenced.

DEAD_CODE_STRIPPING is off. PRESERVE_DEAD_CODE_INITS_AND_TERMS is also off, but shouldn’t matter if DEAD_CODE_STRIPPING is off, should it?

I can work around this problem by adding an explicit reference (I use [ClassName class]), but this is not exactly elegant.

Any ideas what causes the stripping?

Thanks
Kai

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Dead stripping of Cocoa classes from static libraries
      • From: glenn andreas <email@hidden>
  • Prev by Date: Re: Xcode ate my homework
  • Next by Date: Re: Dead stripping of Cocoa classes from static libraries
  • Previous by thread: Re: Xcode ate my homework
  • Next by thread: Re: Dead stripping of Cocoa classes from static libraries
  • Index(es):
    • Date
    • Thread