• 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: Protocol doesn't seem to compile?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Protocol doesn't seem to compile?


  • Subject: Re: Protocol doesn't seem to compile?
  • From: Clark Cox <email@hidden>
  • Date: Fri, 27 Feb 2004 10:41:30 -0500

On Feb 27, 2004, at 10:01, Jason Vowell wrote:

I don't particularly appreciate your asinine attitude, but perhaps you have
answered my question.

I posted this a week ago (and got only one response) and that's really what
I was looking for in an answer.. because if you were to declare your code
that is below in a .h file it would be ignored by the compiler..(at least
that's the behavior in Xcode 1.1.1)

If a header file is never included in a translation unit, the compiler will never see it (this is true of pretty much any build system). I could put the following in a header file:

//Beginning of unused.h
This is just some text, not code, the compiler should barf
//End of unused.h

But if I never include that file anywhere the compiler will never see it (how could it?)


perhaps if it is in a .m file it is
not.. and that is what I would like to know.. is declaring @protocol in .m
files the thing to do?

Just make sure that the file is #include-d/#import-ed in some source file.


--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • RE: Protocol doesn't seem to compile?
      • From: "Jason Vowell" <email@hidden>
References: 
 >RE: Protocol doesn't seem to compile? (From: "Jason Vowell" <email@hidden>)

  • Prev by Date: RE: Protocol doesn't seem to compile? (SOLVED)
  • Next by Date: RE: Protocol doesn't seem to compile?
  • Previous by thread: RE: Protocol doesn't seem to compile?
  • Next by thread: RE: Protocol doesn't seem to compile?
  • Index(es):
    • Date
    • Thread