2015-04-17 23 views
5

Tôi đã đấu tranh để có được VLC làm việc trong ứng dụng iOS của tôi trong một thời bây giờ. Sử dụng Cocoapods, MobileVLCKit được nhập vào dự án của tôi. Khi tôi chạy ứng dụng ngay bây giờ, nó biên dịch không có vấn đề gì. Tuy nhiên, khi tôi bao gồm bất kỳ thứ gì từ MobileVLCKit (MobileVLCKit.h, VLCMediaPlayer.h), ứng dụng gặp sự cố, cho tôi biết rằng các ký hiệu không được tìm thấy. Đây là vụ tai nạn:Nhận MobileVLCKit để làm việc thông qua Cocoapods

Ld /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos/Cameras.app/Cameras normal arm64 
    cd /Users/JohnDoe/ios-cam-app/iOSCamApp 
    export IPHONEOS_DEPLOYMENT_TARGET=7.0 
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -L/Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos -LLibraries -LLibraries/FFmpeg -LLibraries/kxmovie -LLibraries/MBProgressHUD -LLibraries/Nabto -LLibraries/FFmpeg/include -LLibraries/kxmovie/kxmovie.bundle -LLibraries/Nabto/include -LLibraries/Nabto/lib -LLibraries/FFmpeg/include/libavcodec -LLibraries/FFmpeg/include/libavdevice -LLibraries/FFmpeg/include/libavfilter -LLibraries/FFmpeg/include/libavformat -LLibraries/FFmpeg/include/libavutil -LLibraries/FFmpeg/include/libswresample -LLibraries/FFmpeg/include/libswscale -L/Users/JohnDoe/ios-cam-app/iOSCamApp/Libraries/FFmpeg -L/Users/JohnDoe/ios-cam-app/iOSCamApp/Libraries/Nabto/lib -F/Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos -FFrameworks -F/Users/JohnDoe/ios-cam-app/iOSCamApp -filelist /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Intermediates/iOSCamApp.build/Debug-iphoneos/iOSCamApp.build/Objects-normal/arm64/Cameras.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -lPods-AFNetworking -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -lstdc++.6.0.9 -lc++ -liconv.2.4.0 -lbz2 -lz -framework MediaPlayer -framework CoreAudio -framework Crashlytics -framework AudioToolbox -framework Accelerate -framework OpenGLES -lnabto_static_external -framework CoreVideo -framework CoreMedia -framework CFNetwork -framework AVFoundation -lavutil -lavfilter -lPods -lavdevice -lswscale -lnabto_client_api_static -framework Fabric -lavformat -lswresample -lavcodec -framework QuartzCore -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Intermediates/iOSCamApp.build/Debug-iphoneos/iOSCamApp.build/Objects-normal/arm64/Cameras_dependency_info.dat -o /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos/Cameras.app/Cameras 
Undefined symbols for architecture arm64: 
    "_OBJC_CLASS_$_VLCMediaPlayer", referenced from: 
     objc-class-ref in FirstViewController.o 
ld: symbol(s) not found for architecture arm64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

Khi tôi cài đặt VLC qua vỏ ca cao, tôi đã cảnh báo này:

The `iOSCamApp [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `../Pods/Target Support Files/Pods-iOSCamApp/Pods-iOSCamApp.release.xcconfig'. This can lead to problems with the CocoaPods installation 
    - Use the `$(inherited)` flag, or 
    - Remove the build settings from the target. 

Khi tôi thêm các $(inherited) cờ và cố gắng xây dựng, tôi nhận được lỗi sau:

Ld /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos/Cameras.app/Cameras normal arm64 
    cd /Users/JohnDoe/ios-cam-app/iOSCamApp 
    export IPHONEOS_DEPLOYMENT_TARGET=7.0 
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -L/Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos -LLibraries -LLibraries/FFmpeg -LLibraries/kxmovie -LLibraries/MBProgressHUD -LLibraries/Nabto -LLibraries/FFmpeg/include -LLibraries/kxmovie/kxmovie.bundle -LLibraries/Nabto/include -LLibraries/Nabto/lib -LLibraries/FFmpeg/include/libavcodec -LLibraries/FFmpeg/include/libavdevice -LLibraries/FFmpeg/include/libavfilter -LLibraries/FFmpeg/include/libavformat -LLibraries/FFmpeg/include/libavutil -LLibraries/FFmpeg/include/libswresample -LLibraries/FFmpeg/include/libswscale -L/Users/JohnDoe/ios-cam-app/iOSCamApp/Libraries/FFmpeg -L/Users/JohnDoe/ios-cam-app/iOSCamApp/Libraries/Nabto/lib -F/Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos -FFrameworks -F/Users/JohnDoe/ios-cam-app/iOSCamApp -filelist /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Intermediates/iOSCamApp.build/Debug-iphoneos/iOSCamApp.build/Objects-normal/arm64/Cameras.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -lPods-AFNetworking -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration -ObjC -lPods-AFNetworking -lbz2 -liconv -lstdc++ -lxml2 -lz -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreText -framework MobileCoreServices -framework MobileVLCKit -framework OpenGLES -framework QuartzCore -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -lstdc++.6.0.9 -lc++ -liconv.2.4.0 -lbz2 -lz -framework MediaPlayer -framework CoreAudio -framework Crashlytics -framework AudioToolbox -framework Accelerate -framework OpenGLES -lnabto_static_external -framework CoreVideo -framework CoreMedia -framework CFNetwork -framework AVFoundation -lavutil -lavfilter -lPods -lavdevice -lswscale -lnabto_client_api_static -framework Fabric -lavformat -lswresample -lavcodec -framework QuartzCore -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Intermediates/iOSCamApp.build/Debug-iphoneos/iOSCamApp.build/Objects-normal/arm64/Cameras_dependency_info.dat -o /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos/Cameras.app/Cameras 
ld: framework not found MobileVLCKit 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

Có ai biết phải làm gì không? Tôi đã thử rất nhiều thứ và dường như không có gì để giúp đỡ. Tự động hoàn thành có thể đọc các công cụ VLC và tự động hoàn thành nó cho tôi trong Xcode, do đó, khuôn khổ nên được sử dụng tốt.

Trả lời

0

ký Không xác định cho kiến ​​trúc arm64:

Đó có vẻ là vấn đề. Bạn đang biên soạn cho trình mô phỏng và dường như MobileVLCKit không được biên dịch cho nó. ld là trình liên kết phàn nàn về điều này. Bạn đã thử chạy trên thiết bị chưa?

Kiểm tra kiến ​​trúc mà dự án của bạn và MobileVLCKit đang hoạt động.

+1

Khi tôi xây dựng nó cho một thiết bị, tôi nhận được cùng một thông điệp chính xác, ngoại trừ arm64 được thay đổi thành arm7 hoặc bất kỳ thiết bị nào tôi đã cố gắng để xây dựng nó trên. – user1945317

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