• 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: Weird Objective-C observation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird Objective-C observation


  • Subject: Re: Weird Objective-C observation
  • From: glenn andreas <email@hidden>
  • Date: Wed, 7 Sep 2005 15:08:59 -0500


On Sep 7, 2005, at 12:39 PM, John Stiles wrote:

I have had NDAlias in my codebase for quite a while. It works great, no complaints :)

Recently we did a code reorganization and decided to put all of our open-source outside code into one central CVS folder, and at the same time we made a separate target for all this code. So, along with other open-source blocks of code (Expat, Zlib, etc.), NDAlias moved into a lib file ("libContrib.lib"). Our main project has a dependency on this target. So far, so good. All the C-based code works great.

For some reason, though, this change broke NDAlias. It appears that NDAlias adds categories on system classes, and these are no longer getting installed when the app starts up. To make a long story short, -getFSRef is one of many methods that's added to NSURL via a custom category:

Objective C category code stored in a static library ends up stripped when linked with an application (something about the way that module level stripping is done by the linker when that library is linked).


However, if you add "-ObjC" flag when linking the other code with that static library, the linker will incorporate all Objective-C data into the final object (even though it thinks that the Objective- C data looks unreferenced).

Glenn Andreas                      email@hidden
 <http://www.gandreas.com/> wicked fun!
quadrium | build, mutate, evolve | images, textures, backgrounds, art

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


References: 
 >Weird Objective-C observation (From: John Stiles <email@hidden>)

  • Prev by Date: NSThread: precise execution timing
  • Next by Date: Re: Spotlight for ranking and relativity?
  • Previous by thread: Re: Weird Objective-C observation
  • Next by thread: Re: Weird Objective-C observation
  • Index(es):
    • Date
    • Thread