Re: duplicate interface error (solved)
Re: duplicate interface error (solved)
- Subject: Re: duplicate interface error (solved)
- From: Daniel Child <email@hidden>
- Date: Fri, 15 Feb 2008 17:51:47 -0500
Looking at the file paths, I saw that one set of files was referenced
(not copied) from another project.
That was in turn referencing a duplicate of GenericRecord in that
other project. Copied the reference, and copied the file. Now all is
fine.
The "missing" "DataTypes.h" file was then reported as missing (as
expected), so I copied it back in.
Problem resolved....
On Feb 15, 2008, at 5:15 PM, Daniel Child wrote:
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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden