【发布时间】:2016-05-26 04:16:21
【问题描述】:
我正在使用 SocketRocket 作为 WebSocket 库,我通过 MAC 中的 cocoabot 包管理器为 iOS 6 平台安装了该库。
在 appDeligate.m 中我放了头文件
#import <SocketRocket/SRWebSocket.h>
在我正在使用的函数中:
SRWebSocket *_webSocket
_webSocket.delegate = nil;
[_webSocket close];
_webSocket = [[SRWebSocket alloc] initWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"ws://192.168.178.178:6001"]]];
_webSocket.delegate = self;
NSLog(@"Opening Connection...");
[_webSocket open];
在一个独立的项目中,这工作得很好,但是当我将它包含在我的项目中时,我收到以下错误:
Ld /Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Products/Debug-iphoneos/myProject.app/myProject 正常armv7 cd /Users/devuser/Documents/cordovadev/myProject 导出 IPHONEOS_DEPLOYMENT_TARGET=6.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/ usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -L/Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Products/Debug-iphoneos -F/Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Users/devuser/Library/Developer/GStreamer/iPhone.sdk -filelist /Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue /Build/Intermediates/myProject.build/Debug-iphoneos/myProject.build/Objects-normal/armv7/myProject.LinkFileList -miphoneos-version-min=6.0 -dead_strip -lresolv -lstdc++ -framework CoreAudio -framework AudioToolbox -framework VideoToolbox -framework OpenGLES -framework AssetsLibrary -framework QuartzCore -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak_framework CoreMotion -weak-lSystem -force_load /Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Products/Debug-iphoneos/libCordova.a -ObjC -fobjc-link-runtime -framework GStreamer -lresolv -weak_framework CoreMedia -framework CoreVideo -framework OpenGLES /Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Products/Debug-iphoneos/libCordova.a -liconv -framework CoreMotion -framework CoreLocation -framework ImageIO -framework OpenAL -framework AssetsLibrary -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -lPods-myProject -Xlinker -dependency_info -Xlinker /Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Intermediates/myProject.build/Debug-iphoneos/myProject.build/Objects-normal/ armv7/myProject_dependency_info.dat -o /Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Products/Debug-iphoneos/myProject.app/myProject
架构 armv7 的未定义符号:
“_OBJC_CLASS_$_SRWebSocket”,引用自: AppDelegate.o 中的 objc-class-refld:未找到架构 armv7 的符号
clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看 调用)
我已经检查过,但找不到任何相关信息。有什么帮助吗?
【问题讨论】:
标签: objective-c websocket compiler-errors armv7 socketrocket