Xcode 5.1 and compiling error for architecture x86_64

☆樱花仙子☆ 提交于 2019-12-01 04:16:52

问题


Yesterday I had a project working without problem with Xcode 5. Today, after the update to Xcode 5.1 i have 6 errors and the project is not compiling.

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_PayPal", referenced from:
      objc-class-ref in SUAppDelegate.o
      objc-class-ref in SUTViewController.o
  "_OBJC_CLASS_$_PayPalAdvancedPayment", referenced from:
      objc-class-ref in SUTViewController.o
  "_OBJC_CLASS_$_PayPalInvoiceData", referenced from:
      objc-class-ref in SUTViewController.o
  "_OBJC_CLASS_$_PayPalInvoiceItem", referenced from:
      objc-class-ref in SUTViewController.o
  "_OBJC_CLASS_$_PayPalReceiverPaymentDetails", referenced from:
      objc-class-ref in SUTViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The project includes the PayPal library and it is linked properly into the code. It is there, I can see the library, so it is not a missing library.

Running the code in the 6.1 Simulator compiles without problem.

Can be a problem with the new Xcode 5.1 feature "Updates the iOS standard architecture setting to include 64-bit." ?

Maybe I should change the standard Architecture? Or something related to the PayPal library?

Someone know how to solve that?


回答1:


i think the paypal library you are using, does not support arm64.

check this PayPal-iOS-SDK issue-47 for the updated paypal library.

Edit :- update link for paypal library (with arm64 support)




回答2:


Select app target's Build Settings, select Architectures, click on Other... and remove $(ARCHS_STANDARD) and add $(ARCHS_STANDARD_32_BIT)

Below is image for same

Its fix the issue for me.




回答3:


I found this task to be difficult myself so I made a video explaining how to remove the arm64 from the valid architectures. Hope it helps!

https://www.youtube.com/watch?v=d-pJLRy4rVk&feature=youtube_gdata_player




回答4:


Go to Targets -> Build Settings -> Linking -> Other Linker Flags Add -ObjC -l"PayPalMobile" -l"Pods-PayPal-iOS-SDK" -l"c++" -framework "AVFoundation" -framework "AudioToolbox" -framework "CoreLocation" -framework "CoreMedia" -framework "MessageUI" -framework "MobileCoreServices" -framework "SystemConfiguration"




回答5:


If you just miss x86_64 architecture (but you have arm64) and it's not possible to get library that includes x86_64 architecture, do the following:




回答6:


In addition to Nikita's answer, you could change the parameter from "i386" to x86_64 to compile the library matching x86_64 architecture. Then the compiling errors will go away.



来源:https://stackoverflow.com/questions/22330594/xcode-5-1-and-compiling-error-for-architecture-x86-64

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!