" Screenshots It is very difficult for me to set up a category in the class that I made. From...">

"Cannot find interface declaration for <class>"

Screenshots

It is very difficult for me to set up a category in the class that I made. From what I read, Objective-C allows you to create a category for any class, not just closed source ones. (This, to be honest, doesn't make sense otherwise.)

Of course, I can add category messages to the actual class file, but I want them to be separated (since the category is an unusually special use of the class, which can be used in general). I want to share the class, but keep the category private ... anyway.

I removed the category to just show the problem. I (currently) get four errors in the first category post. The number of errors that I get on this line is directly proportional to the number of times that these are links, but this is not even growth. Does anyone know what could be causing this?

+5
source share
1 answer

In the Resources.h file, which ByteCollection.h imports, ByteCollection + words.h is imported. Therefore, when ByteCollection + words.h imports ByteCollection.h, this leads to a circular dependency. The easiest way to break the circular dependency is to move one of the imported files to the implementation file, not the header. This seems to be possible with Resources.h.

† , , , ? , #import , , . , . , A : " , B ", B : " , A ", , , .

+6

All Articles