简体   繁体   English

架构armv7的未定义符号:“ _ OBJC_CLASS _ $ _ SRWebSocket”

[英]Undefined symbols for architecture armv7: “_OBJC_CLASS_$_SRWebSocket”

I'm using SocketRocket as a WebSocket library which I have installed through the cocoabot package manager in a MAC for a platform with iOS 6. 我将SocketRocket用作WebSocket库,已通过cocoabot程序包管理器将其安装在MAC中,用于iOS 6平台。

When in appDeligate.m I put the header files 在appDeligate.m中时,我放置了头文件

#import <SocketRocket/SRWebSocket.h>

and in a function I'm using: 在一个函数中,我正在使用:

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];

In a standalone project this works quite fine, however when I include it in my project I receive the following error: 在一个独立的项目中,这个工作很好,但是当我在项目中包含它时,会收到以下错误:

Ld /Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Products/Debug-iphoneos/myProject.app/myProject normal armv7 cd /Users/devuser/Documents/cordovadev/myProject export 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/Deve ld /用户/ devuser /库/开发人员/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Products/Debug-iphoneos/myProject.app/myProject正常armv7 cd / Users / devuser / Documents / cordovadev / myProject export IPHONEOS_PATH =“/应用/ Xcode.app /内容/开发/平台/ iPhoneOS.platform /开发人员的/ 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 / Deve loper/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 loper / GStreamer / iPhone.sdk-文件列表/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 -frameOpenGL OpenGLES -framework AssetsLibrary -framework QuartzCore -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework -lSystem -force_load /Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Products/Debug-iphoneos/libCordova.a -ObjC -fobjc-link-runtime -framework GStreamer -lresolv -we CoreVideo -framework OpenGLES /用户/ devuser /库/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 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 -frameService SystemConfiguration -framework lPods-myProject -Xlinker -dependency_info -Xlinker /Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Intermediates/myProject.build/Debug-iphoneos/myProject.build/Objects-normal_depend/armv7/ dat -o /Users/devuser/Library/Developer/Xcode/DerivedData/myProject-fxqgbeafqfsypwclwioqqupwexue/Build/Products/Debug-iphoneos/myProject.app/myProject

Undefined symbols for architecture armv7: 架构armv7的未定义符号:
"_OBJC_CLASS_$_SRWebSocket", referenced from: objc-class-ref in AppDelegate.o “ _OBJC_CLASS _ $ _ SRWebSocket”,引用自:AppDelegate.o中的objc-class-ref

ld: symbol(s) not found for architecture armv7 ld:找不到架构armv7的符号

clang: error: linker command failed with exit code 1 (use -v to see invocation) clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

I've checked around but I couldn't find anything relevant. 我已经检查了一下,但是找不到任何相关的东西。 Any help? 有什么帮助吗?

I had to link the socket library into the Build Settings. 我必须将套接字库链接到“构建设置”。

Project->Build Settings->Other Linker Flags->Debug/Release I added 我添加的项目->构建设置->其他链接器标志->调试/发布

-ObjC -l SocketRocket -l icucore -framework CFNetwork -framework Security -ObjC -l SocketRocket -l icucore-框架CFNetwork-框架安全

and now it's working! 现在可以了!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 架构armv7的未定义符号:“_ OBJC_CLASS _ $ _ MPMusicPlayerController” - Undefined symbols for architecture armv7: “_OBJC_CLASS_$_MPMusicPlayerController” 架构armv7的未定义符号:“ _ OBJC_CLASS _ $ _ UBSDKConfiguration”,引用自 - Undefined symbols for architecture armv7: “_OBJC_CLASS_$_UBSDKConfiguration”, referenced from 架构 armv7 的未定义符号:“_OBJC_CLASS_$_ALAssetsLibrary”,引用自:GooglePlus(NSData+GPPAdditions.o) - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_ALAssetsLibrary", referenced from: GooglePlus(NSData+GPPAdditions.o) 架构armv7的未定义符号:“_ OBJC_CLASS _ $ _ Crashlytics”,引自:AppDelegate.o中的objc-class-ref - Undefined symbols for architecture armv7: “_OBJC_CLASS_$_Crashlytics”, referenced from: objc-class-ref in AppDelegate.o 使用objc_setAssociatedObject时,体系结构armv7的未定义符号 - Undefined symbols for architecture armv7 when working with objc_setAssociatedObject SignalR-Objc-架构armv7的未定义符号 - SignalR-Objc - Undefined symbols for architecture armv7 ObjC库用法:体系结构armv7的未定义符号 - ObjC Lbrary Usage: Undefined symbols for architecture armv7 架构i386的未定义符号:“ _ OBJC_CLASS _ $ _ CkoCsv” - Undefined symbols for architecture i386: “_OBJC_CLASS_$_CkoCsv” 体系结构i386的未定义符号:“ _ OBJC_CLASS _ $ _ Analytics” - Undefined symbols for architecture i386: “_OBJC_CLASS_$_Analytics” 架构i386的未定义符号:“ _ OBJC_CLASS _ $ _ SBJsonParser” - Undefined symbols for architecture i386:“_OBJC_CLASS_$_SBJsonParser”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM