0
我想将AMBubbleTableViewController模块添加到我的应用程序(https://github.com/andreamazz/AMBubbleTableView),并且我按照说明操作,但出现很多错误,我不知道为什么。Xcode模块导入错误
这些是错误,任何想法?
Undefined symbols for architecture x86_64:
"_AMOptionsBubbleDetectionType", referenced from:
-[Chat viewDidLoad] in Chat.o
"_AMOptionsBubblePressEnabled", referenced from:
-[Chat viewDidLoad] in Chat.o
"_AMOptionsBubbleSwipeEnabled", referenced from:
-[Chat viewDidLoad] in Chat.o
"_OBJC_CLASS_$_AMBubbleTableViewController", referenced from:
_OBJC_CLASS_$_Chat in Chat.o
"_OBJC_METACLASS_$_AMBubbleTableViewController", referenced from:
_OBJC_METACLASS_$_Chat in Chat.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
,并有我的代码:
- (void)viewDidLoad {
// Bubble Table setup
[self setDataSource:self]; // Weird, uh?
[self setDelegate:self];
[self setTitle:@"Chat"];
// Dummy data
self.data = [[NSMutableArray alloc] initWithArray:@[
@{
@"text": @"He felt that his whole life was some kind of dream and he sometimes wondered whose it was and whether they were enjoying it.",
@"date": [NSDate date],
@"type": @(AMBubbleCellReceived),
@"username": @"Stevie",
@"color": [UIColor redColor]
},
@{
@"text": @"My dad isn’t famous. My dad plays jazz. You can’t get famous playing jazz",
@"date": [NSDate date],
@"type": @(AMBubbleCellSent)
},
@{
@"date": [NSDate date],
@"type": @(AMBubbleCellTimestamp)
},
@{
@"text": @"I'd far rather be happy than right any day.",
@"date": [NSDate date],
@"type": @(AMBubbleCellReceived),
@"username": @"John",
@"color": [UIColor orangeColor]
},
@{
@"text": @"The only reason for walking into the jaws of Death is so's you can steal His gold teeth.",
@"date": [NSDate date],
@"type": @(AMBubbleCellSent)
},
@{
@"text": @"The gods had a habit of going round to atheists' houses and smashing their windows.",
@"date": [NSDate date],
@"type": @(AMBubbleCellReceived),
@"username": @"Jimi",
@"color": [UIColor blueColor]
},
@{
@"text": @"you are lucky. Your friend is going to meet Bel-Shamharoth. You will only die.",
@"date": [NSDate date],
@"type": @(AMBubbleCellSent)
},
@{
@"text": @"Guess the quotes!",
@"date": [NSDate date],
@"type": @(AMBubbleCellSent)
},
]
];
// Set a style
[self setTableStyle:AMBubbleTableStyleFlat];
[self setBubbleTableOptions:@{AMOptionsBubbleDetectionType: @(UIDataDetectorTypeAll),
AMOptionsBubblePressEnabled: @NO,
AMOptionsBubbleSwipeEnabled: @NO}];
// Call super after setting up the options
[super viewDidLoad];
[self.tableView setContentInset:UIEdgeInsetsMake(64, 0, 0, 0)];
}
这是一个链接器错误,因为符号和类定义未包含在正在编译的任何源文件中。确保编译源构建阶段包含'AMBubbleTableViewController.m'和'AMBubbleGlobals.m'文件。 – warrenm 2014-11-24 00:11:00
谢谢!问题已解决。我需要修复更多的东西,但它解决了问题。再次感谢! – 2014-11-24 11:29:39
如果此评论有助于解决您的问题,请接受下面的答案。 – warrenm 2014-11-24 20:28:31