gpt4 book ai didi

ios - 在 10.8 的 Mac 上安装 ffmpeg ios 库 armv7、armv7s、i386 和 universal

转载 作者:可可西里 更新时间:2023-11-01 03:22:40 24 4
gpt4 key购买 nike

如何在 Mac 10.8 上安装最新的 ffmpeg ios 库 armv7、armv7s、i386 和 universal?

最佳答案

几天后,我为这次安装制定了分步说明:

FFmpeg 构建说明 MAC 10.8 或更高版本

复制 ffmpeg-2.0.tar.bz2 ( https://ffmpeg.org/releases/ffmpeg-1.0.7.tar.bz2 , https://ffmpeg.org/download.html ) 并解压到 Documents 文件夹

确保你在 Xcode 下有最新的命令行工具 >;首选项 >;下载 >;组件

安装气体预处理器

  1. 单击 ZIP 图标进行下载 https://github.com/mansr/gas-preprocessor .
  2. 将 gas-preprocessor.pl 复制到/usr/bin 目录。
  3. 通过将权限设置为所有人读写来更改 gas-preprocessor.pl 的权限。

从版本 10.8 开始的 xcrun 中的错误

打开终端并粘贴以下命令并按回车键:

export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer/"

cd 到 ffmpeg-2 文件夹并粘贴以下命令并按回车键:

mkdir armv7
mkdir armv7s
mkdir i386
mkdir -p universal/lib

要配置 armv7s 库,请粘贴以下命令并按回车键:

./configure --prefix=armv7s --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" --extra-cflags="-arch armv7s -mfpu=neon -miphoneos-version-min=6.1" --extra-ldflags="-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.1" --arch=arm --cpu=cortex-a9 --enable-pic

(Note same rule as above: if config fails go to Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ and make sure that the sdk folder is iPhoneOS6.1.sdk, if not change the config command to reflect iPhoneOSx.x.sdk and change all targets to x.x)

要构建和安装 armv7s 库,请粘贴以下命令并按回车键:

make clean && make && make install

要配置 i386(所以模拟器会工作)库粘贴在下面的命令中并按回车键:

./configure --prefix=i386 --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc" --extra-cflags="-arch i386" --extra-ldflags="-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk" --arch=i386 --cpu=i386 --enable-pic --disable-asm

(Note: this is not the same command as the previous two config commands, if you just arrow up to them this will fail)

要构建和安装 i386 库,请粘贴以下命令并按回车键:

make clean && make && make install

要制作通用库(即添加到 xcode 的库),请粘贴以下命令并按回车键:

cd armv7/lib
for file in *.a
do
cd ../..
xcrun -sdk iphoneos lipo -output universal/lib/$file -create -arch armv7 armv7/lib/$file -arch armv7s armv7s/lib/$file -arch i386 i386/lib/$file
echo "Universal $file created."
cd -
done
cd ../..

关于ios - 在 10.8 的 Mac 上安装 ffmpeg ios 库 armv7、armv7s、i386 和 universal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18003034/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com