2013-03-28 62 views
16

通過使用此代碼「_CMTimeGetSeconds」,符號(一個或多個)未找到架構的ARMv7 -IOS

AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:selectedVideoUrl]; 
CMTime duration = playerItem.duration; 
float seconds = CMTimeGetSeconds(duration); 
NSLog(@"duration: %.2f", seconds); 

錯誤

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) 
+0

你鏈接的CoreMedia框架? – 2013-03-28 08:58:33

回答

44

CMTime在CoreMedia.framework定義。將該框架添加到您的項目中。

看一看蘋果的CMTime reference

+0

謝謝它的作品!!!!!!!! – 2013-03-28 09:02:21

+0

救了我一天:) – hafedh 2013-04-17 07:52:49

相關問題