xcode “_CMTimeGetSeconds”,未找到架构 armv7 -IOS 的符号
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15677588/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:05:02 来源:igfitidea点击:
"_CMTimeGetSeconds",symbol(s) not found for architecture armv7 -IOS
提问by ios_av
By using this Code
通过使用此代码
AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:selectedVideoUrl];
CMTime duration = playerItem.duration;
float seconds = CMTimeGetSeconds(duration);
NSLog(@"duration: %.2f", seconds);
Error
错误
Undefined symbols for architecture armv7:
"_CMTimeGetSeconds", referenced from:
-[VideoUpload imagePickerController:didFinishPickingMediaWithInfo:] in VideoUpload.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
回答by Tomas Camin
CMTime is defined in the CoreMedia.framework. Add that framework to your project.
CMTime 在 CoreMedia.framework 中定义。将该框架添加到您的项目中。
And take a look at Apple's CMTime reference
并查看 Apple 的CMTime 参考