iOS7.1 編譯報錯 解決方案 體會
OS升級到 iOS 7.1 了 ,開發人員必須與時俱進。果斷下載更新了xcode5.1版本 ,試運行了一下已上線的應用,哇 報錯了!好頭疼
貼下報錯地方: 都是關於第三方類庫報的錯 比如parse、shareSDK
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_QQApiInterface", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_ShareSDK", referenced from:
objc-class-ref in AppDelegate.o
objc-class-ref in RecipeDetailViewController.o
objc-class-ref in showViewController.o
objc-class-ref in video_show.o
"_OBJC_CLASS_$_TencentOAuth", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_WXApi", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_WeiboApi", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_YXApi", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Xcode升級到5.1 新特性之一就是預設讓所有App都通過64位編譯器編譯。
目前臨時的解決辦法是
1.把1.選中Targets—>Build Settings—>Architectures。
把build active architectures only 改為 NO。
2. 把最下面的Valid Architectures中的arm64引數刪掉就可以了
或者:
雙擊Architectures,選擇other,刪除$(ARCH_STANDARD),然後增加armv7和armv7s(寫上:$(ARCHS_STANDARD_32_BIT))。
3.clean 再build。
待發現更好的解決方案