Skip navigation.
 
mlduplicate interface error
FROM : Daniel Child
DATE : Fri Feb 15 23:15:07 2008

Hi,

I was trying to implement the NSCopying protocol for one of my 
classes, and the next time i compiled I got these two warnings/errors:

warning: duplicate interface declaration for class 'GenericRecord'
error: redefinition of 'struct GenericRecord'

The errors are cited within a file that imports the GenericRecord class.

The interface (and there is only one that I know of) looks harmless 
enough:

@interface GenericRecord : NSObject <NSCopying>
{
<<ivars>>
}
....
- (GenericRecord *) copyWithZone: (NSZone *) zone;

Earlier in the day XCode claimed that I had a duplicate "DataTypes.h" 
file (where I keep some enum definitions and functions). I removed 
the only visible one from the Groups & Files list (being sure to make 
a safe copy elsewhere of the contents elsewhere). Now things compile 
fine, but looking at Groups & Files it looks to me like the file 
ought to be considered missing.

There appears to be some kind of ghost in the machine, and I have no 
idea where to look. I was originally working with smaller programs 
from which some of these files were copied (copy reference and file 
when adding). But I don't see why this is suddenly a problem now and 
have no idea how to fix it.

Thanks in advance.

Daniel

Related mailsAuthorDate
mlduplicate interface error Daniel Child Feb 15, 23:15
mlRe: duplicate interface error (solved) Daniel Child Feb 15, 23:51