Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Undefined symbols for architecture x86_64

When i try to build the application after getting done with the ui and inserting managed objects video i get an error saying: Undefined symbols for architecture x86_64: "OBJC_CLASS$THDiaryEntry", referenced from: l_OBJC$CATEGORY_THDiaryEntry$_CoreDataProperties in THDiaryEntry+CoreDataProperties.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

also when i create a subclass of NSManagedObject my xcode creates a THDiaryEntry+CoreDataProperties.h and .m files which is different from what is created in the video the code for the respective files is as follows

//THDiaryEntry+CoreDataProperties.m
#import "THDiaryEntry+CoreDataProperties.h"

@implementation THDiaryEntry (CoreDataProperties)

@dynamic body;
@dynamic date;
@dynamic imageData;
@dynamic location;
@dynamic mood;

extern NS_ENUM(int16_t, THDiaryEntryMood){
    THDiaryEntryMoodGood = 0, THDiaryEntryMoodAverage = 1,
    THDiaryEntryMoodBad = 2
};
@end
//THDiaryEntry+CoreDataProperties.h

#import "THDiaryEntry.h"

NS_ASSUME_NONNULL_BEGIN

@interface THDiaryEntry (CoreDataProperties)

@property (nullable, nonatomic, retain) NSString *body;
@property (nonatomic) NSTimeInterval date;
@property (nullable, nonatomic, retain) NSData *imageData;
@property (nullable, nonatomic, retain) NSString *location;
@property (nonatomic) int16_t mood;

@end

NS_ASSUME_NONNULL_END