我有两个名为 UserInfo 和 Department 的实体,它们分别具有一对一和一对多关系,在运行我的应用程序时我得到了这个..
Undefined symbols for architecture i386:
"_OBJC_METACLASS_$_NSManagedObject", referenced from:
_OBJC_METACLASS_$_Department in Department.o
_OBJC_METACLASS_$_UserInfo in UserInfo.o
"_OBJC_CLASS_$_NSManagedObject", referenced from:
_OBJC_CLASS_$_Department in Department.o
_OBJC_CLASS_$_UserInfo in UserInfo.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
// 部门.h
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@class UserInfo;
@interface Department : NSManagedObject
@property (nonatomic, retain) NSString * id;
@property (nonatomic, retain) NSString * post;
@property (nonatomic, retain) NSSet *user;
@end
@interface Department (CoreDataGeneratedAccessors)
- (void)addUserObject:(UserInfo *)value;
- (void)removeUserObject:(UserInfo *)value;
- (void)addUser:(NSSet *)values;
- (void)removeUser:(NSSet *)values;
@end
// 部门.m
#import "Department.h"
#import "UserInfo.h"
@implementation Department
@dynamic id;
@dynamic post;
@dynamic user;
@end
出了什么问题?