Quickblox 链接器错误:操作符 delete(void*)",引用自 [英] Quickblox linker error: operator delete(void*)", referenced from
问题描述
我正在使用 Quickblox 创建一个简单的聊天应用.
I'm creating a simple chat app with Quickblox.
所以我像在本教程中一样将项目添加到 XCode:http://quickblox.com/developers/IOS-how-to-connect-Quickblox-framework
So I added the project to XCode exactly like in this tutorial: http://quickblox.com/developers/IOS-how-to-connect-Quickblox-framework
QBUsers 类工作得很好,但是当我使用 QBChat 时,我开始出现链接器错误:
QBUsers class worked just fine, but when I used QBChat I started to get linker errors:
架构 i386 的未定义符号:operator delete(void*)",引用自:- [QBVideoChat initAudioCapture] 在 Quickblox(QBVideoChat.o)operator new(unsigned long)",引用自:- [QBVideoChat initAudioCapture] 在 Quickblox(QBVideoChat.o)___gxx_personality_v0",引用自:Quickblox(QBVideoChat.o) 中的 Dwarf 异常展开信息 (__eh_frame)ld:找不到架构 i386 的符号clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
Undefined symbols for architecture i386: "operator delete(void*)", referenced from: -[QBVideoChat initAudioCapture] in Quickblox(QBVideoChat.o) "operator new(unsigned long)", referenced from: -[QBVideoChat initAudioCapture] in Quickblox(QBVideoChat.o) "___gxx_personality_v0", referenced from: Dwarf Exception Unwind Info (__eh_frame) in Quickblox(QBVideoChat.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
这是导致问题的行(如果我将其注释掉,链接器错误就会消失):
Here's the line that causes the problem (if I comment it out, linker errors go away):
[[QBChat instance] setDelegate:self];
出现问题的类实现了以下协议:
The class in which the problem occurs implements the following protocols:
<QBActionStatusDelegate, QBChatDelegate>
这是我导入到项目中的框架列表:
Here's the list of frameworks I imported to the project:
-lxml2 -lresolv -lz -framework AVFoundation -framework CoreVideo -framework Accelerate -framework CoreMedia -framework AudioToolbox -framework CoreData -framework CoreLocation -framework CoreGraphics -framework MobileCoreServices -framework SystemConfiguration -framework CFNetwork -framework Quickblox -framework UIKit -framework基础
-lxml2 -lresolv -lz -framework AVFoundation -framework CoreVideo -framework Accelerate -framework CoreMedia -framework AudioToolbox -framework CoreData -framework CoreLocation -framework CoreGraphics -framework MobileCoreServices -framework SystemConfiguration -framework CFNetwork -framework Quickblox -framework UIKit -framework Foundation
推荐答案
正如 Greg Parker 在评论中所建议的那样,我将 libc++.dylib 添加到项目中并且一切正常.
As it was suggested in comments by Greg Parker, I added libc++.dylib to the project and everything worked.
这篇关于Quickblox 链接器错误:操作符 delete(void*)",引用自的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!