Cyclic import dependency causes compilation errors
Cyclic import dependency causes compilation errors
- Subject: Cyclic import dependency causes compilation errors
- From: Alexander Hartner <email@hidden>
- Date: Sun, 19 Feb 2006 01:21:06 +0000
I have two classes which depend on each other. The LDAP attribute
contains an array of LDAPAttributeValues. Each LDAPAttribute contains
a reference to it's parent LDAPAttribute. Yet as soon as I compile
this with the line #import "LDAPAttribute.h un-commented, I get an
compilation error:
In file included from /Users/alex/Projects/AddressBook4LDAP/
LDAPObject.h:10,
from /Users/alex/Projects/AddressBook4LDAP/
Connector.h:13,
from /Users/alex/Projects/AddressBook4LDAP/
ABxLDAPController.h:13,
from /Users/alex/Projects/AddressBook4LDAP/
ABxLDAPController.m:9:
/Users/alex/Projects/AddressBook4LDAP/LDAPAttribute.h:21: error:
parse error before 'LDAPAttributeValue'
/Users/alex/Projects/AddressBook4LDAP/LDAPAttribute.h:25: fatal
error: method definition not in @implementation context
compilation terminated.
{standard input}:5:FATAL:.abort detected. Assembly stopping.
Here are the header :
#import <Cocoa/Cocoa.h>
#import "LDAPAttributeValue.h"
@interface LDAPAttribute : NSObject
{
@private
NSString * name;
NSMutableArray * values;
}
and
#import <Cocoa/Cocoa.h>
//#import "LDAPAttribute.h"
@interface LDAPAttributeValue : NSObject
{
@private
NSString * value;
//LDAPAttribute * parentAttribute;
}
Thanks
Alex
_______________________________________________
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