未定義的符號如何解決好以下幾個:用於建築
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_RKObjectLoaderTTModel", referenced from:
objc-class-ref in MyGroupViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
我已經是該代碼:
- (void)createModel {
RKObjectLoader* objectLoader = [[RKObjectManager sharedManager] loadObjectsAtResourcePath:@"/groups.json" delegate:nil];
self.model = [RKObjectLoaderTTModel modelWithObjectLoader:objectLoader];
[super createModel];
}
- (void)didLoadModel:(BOOL)firstTime {
[super didLoadModel:firstTime];
if ([self.model isKindOfClass:[RKObjectLoaderTTModel class]]) {
RKObjectLoaderTTModel* model = (RKObjectLoaderTTModel*) self.model;
NSMutableArray* items = [NSMutableArray arrayWithCapacity:[model.objects count]];
TTListDataSource *dataSource = [[[TTListDataSource alloc] init] autorelease];
for (Group* group in model.objects) {
NSString* imageURL = group.creator.url;
TTTableImageItem* avatar = [TTTableImageItem itemWithText:@" "
imageURL:imageURL];
TTTableItem *item =
[TTTableSubtitleItem
itemWithText:group.name
subtitle:[NSString stringWithFormat:@"%@ members %@ topics ", group.members_count , group.topics_count]
URL:@""];
[items addObject:item];
[items addObject:avatar];
}
dataSource.items = items;
//dataSource.model = model;
self.dataSource = dataSource;
}
}
請建議。
RKObjectLoaderTTModel類是您使用的庫的一部分嗎? – Alfonso
是的,它是...這可能是標題搜索路徑上的錯誤? – adit
不,這意味着可以找到標題(這是它編譯的原因),但庫本身沒有鏈接。 – Alfonso