Reputation: 8225
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?
Upvotes: 4
Views: 8154
Reputation: 11
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.
Upvotes: 0
Reputation: 1435
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:
Upvotes: 0
Reputation: 576
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"
Upvotes: 0
Reputation: 3444
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)
Upvotes: 9
Reputation: 3684
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.
Upvotes: 12