• 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: Xcode warns about missing protocol definition, even though @protocol is used
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode warns about missing protocol definition, even though @protocol is used


  • Subject: Re: Xcode warns about missing protocol definition, even though @protocol is used
  • From: Kyle Sluder <email@hidden>
  • Date: Thu, 03 May 2012 14:58:20 -0700

On May 3, 2012, at 2:54 PM, Florian Pilz wrote:

> Hi again. I just stumbled about this problem for another time and rethought Ulis explanation. The point of my writing is: Ulis explanation is wrong. The program compiles (with a warning) and runs perfectly fine. So basically Xcode tells me, that it must know the implementation details, which are not given in the header file (but may be added in the implementation file -- therefore a warning rather an error).

Please post your code in its entirety.

I just tried this, and it gives me a warning:

// t.m
#import <Foundation/Foundation.h>

@protocol FooProto;

@interface SomeClass : NSObject <FooProto>
@end

@implementation SomeClass
@end

int main(int argc, char **argv)
{
    [SomeClass new];
    return 0;
}

@protocol FooProto
@end
// END t.m

% clang -o t t.m -framework Foundation
t.m:5:34: warning: cannot find protocol definition for 'FooProto'
1 warning generated.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Xcode warns about missing protocol definition, even though @protocol is used
      • From: Marco S Hyman <email@hidden>
References: 
 >Re: Xcode warns about missing protocol definition, even though @protocol is used (From: Florian Pilz <email@hidden>)

  • Prev by Date: Re: Xcode warns about missing protocol definition, even though @protocol is used
  • Next by Date: Re: Xcode warns about missing protocol definition, even though @protocol is used
  • Previous by thread: Re: Xcode warns about missing protocol definition, even though @protocol is used
  • Next by thread: Re: Xcode warns about missing protocol definition, even though @protocol is used
  • Index(es):
    • Date
    • Thread