标签:
解决方法是:
1 |
[WeiboSDK registerApp: @"xxxxxxxx"]; |
1 |
[__NSDictionaryM weibosdk_WBSDKJSONString] : unrecognized selector sent to instance 0x170255780 |
1 2 3 4 5 6 7 8 |
Undefined symbols for architecture i386: "_GCControllerDidConnectNotification", referenced from: -[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2dx iOS.a(CCController-iOS.o) "_GCControllerDidDisconnectNotification", referenced
from: -[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2dx iOS.a(CCController-iOS.o) "_OBJC_CLASS_$_GCController", referenced from: objc-class-ref in libcocos2dx iOS.a(CCController-iOS.o) (maybe you meant: _OBJC_CLASS_$_GCControllerConnectionEventHandler) |
1 |
源代码 ==[编译器]==》 汇编码 ==[汇编器]==》 对象文件 ==[链接器]==》 可执行程序、动态链接库或静态链接库 |
1 |
ar -x lieWeiboSDK.a |
1 2 |
ar: libWeiboSDK.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it) ar: libWeiboSDK.a: Inappropriate file type or format |
1 |
lipo -create libXXX.i386_x86_64.a libXXX.armv7_arm64.a -output libXXX.a |
1 |
lipo -info libWeiboSDK.a |
1 |
Architectures in the fat file: libWeiboSDK.a are: armv7 arm64 i386 x86_64 |
1 |
lipo -thin i386 libWeiboSDK.a -output libWeiboSDK.i386.a |
1 |
ar -x libWeibo.i386.a |
1 2 3 4 5 6 7 8 9 |
-rw-r--r-- 1 leenjewel staff 13K Jan 8 15:47 NSData+WBSDKBase64.o -rw-r--r-- 1 leenjewel staff 42K Jan 8 15:47 UIImage+WBSDKResize.o -rw-r--r-- 1 leenjewel staff 12K Jan 8 15:47 UIImage+WBSDKStretch.o -rw-r--r-- 1 leenjewel staff 74K Jan 8 15:47 UIView+WBSDKSizes.o
-rw-r--r-- 1 leenjewel staff 58K Jan 8 15:47 WBAidManager.o -rw-r--r-- 1 leenjewel staff 15K Jan 8 15:47 WBAuthorizeRequest.o -rw-r--r-- 1 leenjewel staff 16K Jan 8 15:47 WBAuthorizeResponse.o -rw-r--r-- 1 leenjewel staff 19K Jan 8 15:47 WBBaseMediaObject.o
-rw-r--r-- 1 leenjewel staff 265K Jan 8 15:47 WBSDKJSONKit.o |
1 |
Objective-C 中方法的执行实在运行时决定的,所以链接器只链接类的符号,不链接方法的符号 |
1 |
[__NSDictionaryM weibosdk_WBSDKJSONString] : unrecognized selector sent to instance 0x170255780 |
1 |
nm *.o >> libWeiboSDK.symbols.txt |
1 2 3 4 |
WBSDKJSONKit.o: 00007ba0 t -[NSArray(WBSDKJSONKitSerializing) weibosdk_WBSDKJSONString] 00007de8 t -[NSDictionary(WBSDKJSONKitSerializing) weibosdk_WBSDKJSONString] 000079cd t -[NSString(WBSDKJSONKitSerializing) weibosdk_WBSDKJSONString] |
1 2 3 4 5 6 7 8 |
Undefined symbols for architecture i386: "_GCControllerDidConnectNotification", referenced from: -[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2dx iOS.a(CCController-iOS.o) "_GCControllerDidDisconnectNotification", referenced
from: -[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2dx iOS.a(CCController-iOS.o) "_OBJC_CLASS_$_GCController", referenced from: objc-class-ref in libcocos2dx iOS.a(CCController-iOS.o) (maybe you meant: _OBJC_CLASS_$_GCControllerConnectionEventHandler) |
iOS 平台 Cocos2d-x 项目 接入第三方SDK 的坑(就是静态库接入的问题)
标签:
原文地址:http://blog.csdn.net/topws1/article/details/51141150