1.C compiler test failed.
原因:compile-ffmpeg.sh all 命令找不到 Xcode
解決辦法:
compile-ffmpeg.sh clean #重置清理編譯環(huán)境
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer
compile-ffmpeg.sh all
2./libavutil/arm/asm.S:50:9: error: unknown directive
原因:編譯armv7庫失敗
解決辦法:
1.刪除compile-ffmpeg.sh FF_ALL_ARCHS_IOS8_SDK="armv7 arm64 i386 x86_64" 中的armv7改為FF_ALL_ARCHS_IOS8_SDK="arm64 i386 x86_64"
編譯成功后的到的庫不支持armv7框架,項目支持armv7會報錯喝峦。
2.修改tools文件夾中的do-compile-ffmpeg.sh文件
將下面代碼:
elif [ "$FF_ARCH" = "armv7" ]; then
FF_BUILD_NAME="ffmpeg-armv7"
FF_BUILD_NAME_OPENSSL=openssl-armv7
FF_XCRUN_OSVERSION="-miphoneos-version-min=6.0"
FF_XCODE_BITCODE="-fembed-bitcode"
FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_FLAGS_ARM"
# FFMPEG_CFG_CPU="--cpu=cortex-a8"
elif [ "$FF_ARCH" = "armv7s" ]; then
修改為:
elif [ "$FF_ARCH" = "armv7" ]; then
FF_BUILD_NAME="ffmpeg-armv7"
FF_BUILD_NAME_OPENSSL=openssl-armv7
FF_XCRUN_OSVERSION="-miphoneos-version-min=6.0"
FF_XCODE_BITCODE="-fembed-bitcode"
# FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_FLAGS_ARM"
FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-pic --disable-asm"
# FFMPEG_CFG_CPU="--cpu=cortex-a8"
elif [ "$FF_ARCH" = "armv7s" ]; then
然后compile-ffmpeg.sh clean 重置,從新執(zhí)行compile-ffmpeg.sh all命令