Is there a bug in #include operation?
Is there a bug in #include operation?
- Subject: Is there a bug in #include operation?
- From: Denis Stanton <email@hidden>
- Date: Tue, 2 Mar 2004 09:33:09 +1300
Is there a problem in Xcode 1.1's handling of #include where classes
are mutually dependent ?
I have written about 20 classes. There are many dependencies so each
.h file contains one or more #include statements. In some cases these
could form loops. so aaa.h includes bbb.h, bbb.h includes ccc.h and
ccc.h includes aaa.h
I have had this compiling satisfactory, but now I've added one more
file and I'm getting a compile error message
"error: cannot find interface declaration for `One', superclass of
`Status'"
I can see that Status.m has the line #include "Status.h", and Status.h
has #include "One.h" so the error doesn't make sense to me.
I notice that in the error message it lists the nested includes and I
can see that One.h has already been found once, before it is reported
as not found. I wonder if the compiler could have a bug in that it
doesn't load One.h a second time because it has already seen it, and
then complains that it has not been found.
Building target myApplication with build style Development
(optimization:level 0, debug-symbols:on) (1 error)
Compiling ERDocument.m
Compiling ERMainWindowController.m
Compiling ERBookingController.m
Compiling Agent.m (1 error)
In file included from
/Users/denisstanton/Projects/myApplication/Agent.m:9:
In file included from
/Users/denisstanton/Projects/myApplication/Agent.h:11,
In file included from
/Users/denisstanton/Projects/myApplication/One.h:11,
In file included from
/Users/denisstanton/Projects/myApplication/ERDocument.h:11,
In file included rom
/Users/denisstanton/Projects/myApplication/ERMainWindowController.h:11,
In file included from
/Users/denisstanton/Projects/myApplication/Statuss.h:13,
error: cannot find interface declaration for `One', superclass
of `Status'
Am I being stupid, or is there a problem with Xcode? I know from
experience elsewhere that most "bugs" reported by beginners are
actually user error.
Denis
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.