cross inclusion with fully qualified types in interface
cross inclusion with fully qualified types in interface
- Subject: cross inclusion with fully qualified types in interface
- From: Greg Hoover <email@hidden>
- Date: Wed, 5 Apr 2006 19:29:51 -0700
It is my understanding the #import prevents multiple inclusion,
however I have run into the following situation that I have been
unable to discern. Given two cocoa objects with header files:
// File a.h
#import "b.h"
@interface a : NSObject {
b *foo;
}
@end
// File b.h
#import "a.h"
@interface b :NSObject {
a *bar;
}
@end
GCC generates a parse error before foo and bar. However if the fully
qualified type declarations are replaced by 'id', the source compiles
without incident. In my previous experience, protecting header files
was sufficient to prevent, what looks like a multiple inclusion
issue. However, even after protecting the header files (which I
understand is unnecessary when using #import), I still run into this
problem.
Any information would be much appreciated.
Thank You.
GH
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden