On Apr 30, 2015, at 4:29 PM, William Squires wrote:

>  If I understand properly, you can't have a circular #import - you could have 
> a circular #include (in older C code), but from what I recall, #import is 
> supposed to prevent that sort of problem; each symbol only gets imported 
> once, regardless of the number of times the header is encountered by the 
> compiler/pre-processor... That's not to say there's not a bug in the works, 
> mind you. :)
> 

That's what I thought too, but I guess that's not the case.  

I thought that using #import uses an approach like an NSSet that prevents more 
than one occurrence of the item in the include tree.

Doesn't Apple's docs say that #import prevents that?

Anyway, searching Stackoverflow for "Unknown type name" shows several cases of  
this and when I removed my AppDelegate code from my one of my classes and 
commented out the #import of the AppDelegate, the error went away and I was 
able to build to the iPhone.

I wonder if this is a bug in #import?



> On Apr 30, 2015, at 3:20 PM, Alex Zavatone <[email protected]> wrote:
> 
>> 
>> On Apr 30, 2015, at 4:07 PM, Alex Zavatone wrote:
>> 
>>> Just had this lovely build error crop up.
>>> 
>>> I'm including a .h file in my iOS app's AppDelegate.h.  Say it's XXXX.h
>>> 
>>> Right below the #import in the @interface, I've got an iVar of that class.
>>> 
>>> And below the @interface, a property that's nonatomic and strong for an 
>>> instance of that class.
>>> 
>>> Xcode just started telling me that this class that I'm including is of 
>>> "Unknown type name" on the lines where the iVar and the property are 
>>> defined.
>>> 
>>> The class itself compiles, is spelled properly, is in the project and in 
>>> the Compile Sources section of the build.
>>> 
>>> I'm having trouble understanding where to look here for what's broken.
>>> 
>>> Any ideas?
>>> 
>>> Thanks in advance,
>>> Alex Zavatone
>> 
>> OK.  Looks like i have a circular #import going on.  Fun times.
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Xcode-users mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/xcode-users/wsquires%40satx.rr.com
>> 
>> This email sent to [email protected]
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/xcode-users/zav%40mac.com
> 
> This email sent to [email protected]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to