I am following apples Core Data Utility tutorial from http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreDataUtilityTutorial/Articles/00_introduction.html
I have only just started it and have already encountered an error (more than likely my error, not anyone else's).
Given the code
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import <objc/objc-auto.h>
NSManagedObjectModel *managedObjectModel();
int main (int argc, const char * argv[]) {
objc_startCollectorThread();
return 0;
}
NSManagedObjectModel *managedObjectModel() {
static NSManagedObjectModel *mom = nil;
if(mom != nil){
return mom;
}
mom = [[NSManagedObjectModel alloc] init];
// implimentation continues
return mom;
}
I get the error:
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from: objc-class-ref-to-NSManagedObjectModel in CoreDataUtility.o
I am guessing that the issue is caused by my forward declaration of the managedObjectModel() function, but I cannot solve as to why I am getting the issue I am.