• 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
Cyclic import dependency causes compilation errors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Cyclic import dependency causes compilation errors
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: altering NSPopupButtons
  • Next by Date: Re: Cyclic import dependency causes compilation errors
  • Previous by thread: Re: altering NSPopupButtons
  • Next by thread: Re: Cyclic import dependency causes compilation errors
  • Index(es):
    • Date
    • Thread