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

Re: Dead stripping of Cocoa classes from static libraries


  • Subject: Re: Dead stripping of Cocoa classes from static libraries
  • From: glenn andreas <email@hidden>
  • Date: Thu, 27 Mar 2008 10:40:22 -0500


On Mar 27, 2008, at 10:08 AM, Kai wrote:

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.



You need to add -ObjC to the "additional linker flags". This tells the linker to not strip any Objective-C classes, etc... that it may find even if they aren't directly referenced.



Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build, mutate, evolve, animate




_______________________________________________
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


References: 
 >Dead stripping of Cocoa classes from static libraries (From: Kai <email@hidden>)

  • Prev by Date: Dead stripping of Cocoa classes from static libraries
  • Next by Date: other linker flags in project settings
  • Previous by thread: Dead stripping of Cocoa classes from static libraries
  • Next by thread: other linker flags in project settings
  • Index(es):
    • Date
    • Thread