bilibili / ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
GNU General Public License v2.0
32.59k stars 8.14k forks source link

demo编译出错, #2094

Closed stoneeagle closed 8 years ago

stoneeagle commented 8 years ago

Ld /Users/feiying/Library/Developer/Xcode/DerivedData/IJKMediaDemo-bmshvgsjzerkhhatkzhxedgpltah/Build/Products/Debug-iphonesimulator/IJKMediaDemo.app/IJKMediaDemo normal x86_64 cd /Users/feiying/Downloads/ijkplayer-test/ijkplayer-ios/ios/IJKMediaDemo export IPHONEOS_DEPLOYMENT_TARGET=7.0 export PATH="/Applications/Xcode6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode6.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -L/Users/feiying/Library/Developer/Xcode/DerivedData/IJKMediaDemo-bmshvgsjzerkhhatkzhxedgpltah/Build/Products/Debug-iphonesimulator -F/Users/feiying/Library/Developer/Xcode/DerivedData/IJKMediaDemo-bmshvgsjzerkhhatkzhxedgpltah/Build/Products/Debug-iphonesimulator -filelist /Users/feiying/Library/Developer/Xcode/DerivedData/IJKMediaDemo-bmshvgsjzerkhhatkzhxedgpltah/Build/Intermediates/IJKMediaDemo.build/Debug-iphonesimulator/IJKMediaDemo.build/Objects-normal/x86_64/IJKMediaDemo.LinkFileList -mios-simulator-version-min=7.0 -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -framework AudioToolbox -framework AVFoundation -framework CoreGraphics -framework CoreMedia -framework CoreVideo -lbz2 -lz /Users/feiying/Library/Developer/Xcode/DerivedData/IJKMediaDemo-bmshvgsjzerkhhatkzhxedgpltah/Build/Products/Debug-iphonesimulator/IJKMediaFramework.framework/IJKMediaFramework -framework MediaPlayer -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework UIKit -framework VideoToolbox -Xlinker -dependency_info -Xlinker /Users/feiying/Library/Developer/Xcode/DerivedData/IJKMediaDemo-bmshvgsjzerkhhatkzhxedgpltah/Build/Intermediates/IJKMediaDemo.build/Debug-iphonesimulator/IJKMediaDemo.build/Objects-normal/x86_64/IJKMediaDemo_dependency_info.dat -o /Users/feiying/Library/Developer/Xcode/DerivedData/IJKMediaDemo-bmshvgsjzerkhhatkzhxedgpltah/Build/Products/Debug-iphonesimulator/IJKMediaDemo.app/IJKMediaDemo

Undefined symbols for architecture x86_64: "_clock_gettime", referenced from: _av_gettime_relative in IJKMediaFramework(time.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

我是按如下进行操作的: git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-ios cd ijkplayer-ios git checkout -B latest k0.6.2

./init-ios.sh

cd ios ./compile-ffmpeg.sh clean ./compile-ffmpeg.sh all

然后,用xcode打开的ijkplayer-ios/ios/IJKMediaDemo/IJKMediaDemo.xcodeproj,编译就出现了如上问题!

stoneeagle commented 8 years ago

问题找到了,我安装了两个xcode,默认的是xcode8,可以在编译ffmpeg时候用的是xcode8,而我打开demo工程用的是xcode7.3,导致链接出错,使用xcode8就可以了