• 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: CPP Protocol Error ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CPP Protocol Error ?


  • Subject: Re: CPP Protocol Error ?
  • From: Ron Hunsinger <email@hidden>
  • Date: Tue, 06 Mar 2012 19:33:53 -0800


On Mar 5, 2012, at 9:59 AM, koko wrote:

I am compiling a project of obj-c and cpp with a compiler setting of compile all source as obj-c++.  I  have been doing this for some some time now and suddenly I get this error:

Cannot find protocol definition for CPtrList
Cannot find protocol definition for HTREEITEM

on this line of code in a cpp header file:

typedef CTypedPtrList<CPtrList, HTREEITEM> CTreeItemList;

where in included files both CPtrList and HTREEITEM are defined.

So this seem like some Compilier mumbo jumbo thinking that CTypedPtrList is an obj-c class and we are defining protocol implementations CPtrList and HTREEITEM

I am all ears to thought and suggestions as to how to resolve this dilemma.

What if you add a namespace annotation, so the compile will know it can't possibly be ObjC syntax? Something like:

    typedef CTypedPtrList< ::CPtrList, ::HTREEITEM> CTreeItemList;

I'm not sure exactly where you'd need them, nor what namespace you're compiling into, but a protocol name is syntactically an identifier, and ::CPtrList most definitely isn't.

-Ron Hunsinger

 _______________________________________________
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: 
 >CPP Protocol Error ? (From: koko <email@hidden>)

  • Prev by Date: Re: Xcode - AN APPLE OPPORTUNITY!
  • Next by Date: Why is Instruments showing my Mac apps when selecting an iOS Simulator target?
  • Previous by thread: Re: CPP Protocol Error ?
  • Next by thread: File confusion
  • Index(es):
    • Date
    • Thread