gpt4 book ai didi

ios - Xcode 模块导入错误

转载 作者:行者123 更新时间:2023-11-29 02:29:24 26 4
gpt4 key购买 nike

我正在尝试将 AMBubbleTableViewController 模块添加到我的应用程序 ( https://github.com/andreamazz/AMBubbleTableView ),并且我按照说明进行操作,但我遇到了很多错误,我不知道为什么。

这些是错误,知道吗?

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.mAMBubbleGlobals.m 文件。

关于ios - Xcode 模块导入错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27095542/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com