Re: CPP Protocol Error ?
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