• 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: Missing Obj-C Category Method Implementations: No linker errors?!?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing Obj-C Category Method Implementations: No linker errors?!?!


  • Subject: Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
  • From: Jonas Maebe <email@hidden>
  • Date: Sat, 14 Mar 2009 09:28:36 +0100


On 14 Mar 2009, at 09:17, Phillip Hutchings wrote:

On 14/03/2009, at 20:41, Jonas Maebe wrote:

On 14 Mar 2009, at 05:57, Jerry Krinock wrote:

I understand I'm not getting any build errors since the #imports are including all the required declarations. But why don't these omissions of category implementations generate linker errors?

http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocProtocols.html#/ /apple_ref/doc/uid/TP30001163-CH15-114323

http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocObjectsClasses.html#/ /apple_ref/doc/uid/TP30001163-CH11-SW1 is probably a better answer.


In short, it's not a linker error because it's not an error. Objective-C doesn't check until runtime, as the missing method is a runtime exception, and can be caught and handled at runtime if needed. The compiler will generate a warning though.

As explained at the link I posted, the compiler won't even generate a warning in this case.



Jonas _______________________________________________ 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: Missing Obj-C Category Method Implementations: No linker errors?!?!
      • From: Jerry Krinock <email@hidden>
References: 
 >Missing Obj-C Category Method Implementations: No linker errors?!?! (From: Jerry Krinock <email@hidden>)
 >Re: Missing Obj-C Category Method Implementations: No linker errors?!?! (From: Jonas Maebe <email@hidden>)
 >Re: Missing Obj-C Category Method Implementations: No linker errors?!?! (From: Phillip Hutchings <email@hidden>)

  • Prev by Date: Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
  • Next by Date: Debugging C exercises that use inputs (e.g. scanf)
  • Previous by thread: Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
  • Next by thread: Re: Missing Obj-C Category Method Implementations: No linker errors?!?!
  • Index(es):
    • Date
    • Thread