I'm running Swift 4 and Xcode 9 beta. I get this errors and I have no idea how to solve it. I don't even know what does that mean..
Undefined symbols for architecture x86_64:
"__T0So22AVCapturePhotoSettingsC12AVFoundation01_abC16SwiftNativeTypesACWP", referenced from:
__T014InstagramClone26CustomCameraViewControllerC23cameraBtn_TouchUpInsideyypF in CustomCameraViewController.o
"__T012AVFoundation39_AVCapturePhotoSettingsSwiftNativeTypesPAAE016availablePreviewc11PixelFormatG0Says6UInt32VGfg", referenced from:
__T014InstagramClone26CustomCameraViewControllerC23cameraBtn_TouchUpInsideyypF in CustomCameraViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any idea how to solve this?
On my case, I've called settings = AVCapturePhotoSettings() and I got that error.
Eventually the solution was calling a different initialiser. i.e:
settings = AVCapturePhotoSettings(format: [AVVideoCodecKey : AVVideoCodecType.jpeg])
It looks like your project probably isn't linking against AVFoundation. Click on your project at the top of the Project Navigator, select your target, and click "Build Phases." In the "Link Binary with Libraries" phase, click the Add button, select AVFoundation from the list, and add it. This should cause your project to build normally.
Related
When I'm trying to run the project i receive the following errors
Here is the log.
Undefined symbols for architecture armv7: __ZN6metaio40getScreenRotationForInterfaceOrientationE22UIInterfaceOrientation", referenced from: -[MetaioSDKViewController viewDidLoad] in MetaioSDKViewController.o -[MetaioSDKViewController willAnimateRotationToInterfaceOrientation:duration:] in MetaioSDKViewController.o -[ARELViewController willAnimateRotationToInterfaceOrientation:duration:] in ARELViewController.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does any one knows what the reason might be.
This project has bind with the Metio . AR framework.
Thanks
Click on your Project and go to Build Settings and change the value of Build Active Architecture only to yes.
Let me know if it solves the error:)
I am new to iphone develop and phonegap also. Now i want to create simple iphone app using phonegap. Now i am using phonegap2.0 in lion mac. MY Xcode version is 4.3. Now my issue is after install the phonegap2.0 in xcode when i run the Xcode in my Simulator 5.0. I got this below error.
"Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CDVViewController", referenced from:
_OBJC_CLASS_$_ViewController in ViewController.o
objc-class-ref in AppDelegate.o
"_OBJC_METACLASS_$_CDVViewController", referenced from:
_OBJC_METACLASS_$_ViewController in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
Please help me to solve this issue. Thanks in Advance.
And i have attach the Screen Shot of error page for your reference.
Check if your project links libCordova.a (in my case Xcode forgot about the reference, when moving CordovaLib.xcodeproj to another location).
select your project in the Project Navigator
go to the Summary tab
drag CordovaLib.xcodeproj > Products > libCordova.a to Linked Frameworks and Libraries
Clean & build.
Please check your ViewController.m file and goto to
1. Build phase in xcode
2. Select Compile Sources
3. Press + button to add .m/.mm file
I think it will run successfully now
Remove armv7s from your build settings, for both your project and the referenced subproject Cordova. Set your target to 4.3.
I had a similar issue. Somehow my the NSManagedObject Sub-classes of my Core Data entities were in the Compile Sources table twice. The compiler would choke when it hit the first of these duplicates.
I just went into the Compile Sources table and deleted the second occurrence of each .m listing.
I have the following failed code when i run my application on iPhone 5.1 simulator. My app runs smoothly before i add in the Facebook Connect into my application.
Undefined symbols for architecture i386:
"_FBCreateNonRetainingArray", referenced from:
-[FBSession initWithKey:secret:getSessionProxy:] in FBSession.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
May I know what can i do to get rid of this?
Thanks
2 things that usually get rid of that error.
1) go to: target > build phases > link binary with library -- make sure you've added the correct framework
2) go to: target > build phases > compile sources -- add any implementation files that are in your program but do not appear in that list.
Those two steps usually fix that kind of error.
I using the code from Apple for MailComposer but when I try to run my app i get a error message and I can't build my app.
The message error I get:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
objc-class-ref in InfoMailComposerViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Know anybody what this means??
thanks in advance
You have to include the MessageUI.framework in your project.
If you are using Xcode 4:
Select the Project then highlight your active Target.
Select the "Build Phases" Tab
Expand "Link Binary With Libraries"
Hit the '+' button
Select MessageUI.framework
The above answer by MarkPowell works like a charm.
I first tried it on the CordovaLib.xcodeproj file.
It did not work, then I tried it at Testing.xcodeproj. Then the errors disappeared and worked magically.
I have added the frameworks (MapKit and CoreLocation) by selecting the Frameworks folder, right clicking, Add > Existing Frameworks.
The app builds in the Simulator (3.1.3) but fails on the Device (3.1.3) with the error:
ld: warning: in
/Development/Sites/iPhone
Projects/SwitchViews/MapKit.framework/MapKit,
file is not of required architecture
Undefined symbols:
"_OBJC_CLASS_$_MKPinAnnotationView",
referenced from:
__objc_classrefs__DATA#0 in NextView.o ld: symbol(s) not found
collect2: ld returned 1 exit status
It seems that I just needed to restart Xcode to get things linked up properly.
It looks like you by accident have selected the "copy to project" checkbox when adding the framework.
Try to delete the framework from your project and add it again, making sure you have selected the default framework path, and that you don't copy it to your project.