Today I have added to my project MWPhotoBrowser using cocoapods source control.
Tests in emulator where correct but when I start to test app on devices (ipode touch 5gen and iphone 4s) I got few issues:
ld: warning: directory not found for option '-L/Users/user/Pods/build/Debug-iphoneos'
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_MWPhotoBrowser", referenced from:
objc-class-ref in KYMUFinalPageTVC.o
"_OBJC_CLASS_$_MWPhoto", referenced from:
objc-class-ref in KYMUFinalPageTVC.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If you get this error with MWPhotoBrowser and you're in Xcode 6.1, then do this,
Go to your project -> Build Settings, and search for "Other Linked Flags" and add $(OTHER_LDFLAGS) to it.
Source:
https://stackoverflow.com/a/26721045/1032179
Related
I have created a framework & integrated in the another app(Demo). When i run this Demo app on simulator then there is not any error...
But when do i run on device its gets error.
ld: warning: ignoring file /Users/mac/Desktop/library file/Demo/pk.framework/pk, file was built for x86_64 which is not the architecture being linked (arm64): /Users/mac/Desktop/library file/Demo/pk.framework/pk
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_InterstitialAdView", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please share your experience.
I am using Xcode 9.0
Thanks
You have to know simulator and devices have different cpu types, when you build Xcode will build the app and link the libraries according to the target type.
From the error info, it seems your framework only provide the x86_64 architecture (for simulator), you should build your framework for the device architecture (arm64) instead !
Hello I am currently working on an IOS app in xcode 6. I am getting the following error when archiving the application. It runs successfully when built on the emulator. After further inspection I've found this specific error message while compiling each piece of code step-by-step in the terminal.
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_FBAppCall", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FBLoginView", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FBProfilePictureView", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I believe you should go to your project settings, then your target and ensure you set the Architectures and Valid Architectures to what you see in the below image, the first one is selectable through Xcode while you should ensure you set the second one manually.
I faced the same problem while runnning the project.
Go to Build settings -- > Build architecture only
to set
Debug - YES
Release - NO
Add --> Other linker flag: - objc, -lc++, $(inherited)
clean and run the project. It was fixed for me !
I am using Xcode 6.1 with iOS 8.1 SDK to develop an iOS application.
SailracerEngine class imports SmoothSpeedTimeSeries and SmoothCourseTimeSeries classes to implement some of its functionality. Both are subclasses of SmoothTimeSeries. When I try to build my project, linker fails with the following error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_SmoothCourseTimeSeries", referenced from:
objc-class-ref in SailracerEngine.o
"_OBJC_CLASS_$_SmoothSpeedTimeSeries", referenced from:
objc-class-ref in SailracerEngine.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Other module in my code is using SmoothSpeedTimeSeries and SmoothCourseTimeSeries without any linker errors. How can this issue be solved?
The implementation file for class SmoothCourseTimeSeries has not been added to the Xcode Target.
If you click on the implementation file you should be able to see which Xcode targets it belongs to using the file inspector on the right.
When adding iRate to my app I get this error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_iRate", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Sounds like when you added the .m file to your project, it wasn't assigned to your target. Select iRate.m in the project navigator. Then bring up the utilities view on the right side of Xcode. Under Target Membership, make sure your app's target is checked. Try the build again.
I'm using Reachability on my project to get the type of connection used, but an error has ocurred.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Reachability", referenced from:
objc-class-ref in ContributionViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I don't know what to do... my project is for iOS 4.3 and I've never had this kind of problem before.
Thx
Did you include the reachability framework in your projects linked libraries ? You can confirm by clicking on your project file on the file list and checking the build phases tab. It should be listed in the linked library section,