2013-03-28 24 views
16

Bằng cách sử dụng Bộ luật này"_CMTimeGetSeconds", biểu tượng (s) không tìm thấy cho kiến ​​trúc ARMv7 -IOS

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

Lỗi

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

Bạn đã liên kết khung CoreMedia chưa? –

Trả lời

44

CMTime được định nghĩa trong CoreMedia.framework. Thêm khuôn khổ đó vào dự án của bạn.

Và hãy xem Apple CMTime reference

+0

Cảm ơn nó hoạt động !!!!!!!! –

+0

đã lưu ngày của tôi :) – hafedh

Các vấn đề liên quan