我正在运行Swift4和Xcode9测试版。我得到了这个错误,我不知道如何解决它。我甚至不知道那是什么意思……
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)
知道怎么解决这个问题吗?
最佳答案
在我的案例中,我打电话给settings = AVCapturePhotoSettings()
发现了这个错误。
最终,解决方案调用了另一个初始化程序。即:
settings = AVCapturePhotoSettings(format: [AVVideoCodecKey : AVVideoCodecType.jpeg])
关于swift - Xcode错误 - 架构x86_64的 undefined symbol ?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/45694242/