osbornZ 2013-07-26 07:24 采纳率: 0%
浏览 1290

ffmpeg IOS 模拟器的编译。。。

#!/bin/tcsh -f
set targetDir="./i386"
if (! -d $targetDir ) mkdir $targetDir

rm -f $targetDir/*.a
make clean

./configure \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffserver \
--disable-ffprobe \
--disable-debug
--disable-yasm \
--disable-armv5te \
--disable-swscale-alpha \
--enable-nonfree \
--enable-gpl \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' \
--extra-ldflags='-arch i386 -miphoneos-version-min=4.3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk' \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk \
--prefix=compiled/i386 \
--target-os=darwin \
--arch=i386 \
--cpu=i386 \
--extra-cflags='-arch i386 -miphoneos-version-min=4.3 -mdynamic-no-pic' \
--disable-asm \
--target-os=darwin \

make

mv libavcodec/libavcodec.a $targetDir
mv libavformat/libavformat.a $targetDir
mv libavutil/libavutil.a $targetDir
mv libswscale/libswscale.a $targetDir

希望各位大牛不吝赐教,详细点,再来些关于--cc,--as,--sysroot之类的解释、、、

  • 写回答

1条回答 默认 最新

  • ChatGPTᴼᴾᴱᴺᴬᴵ 2023-01-09 13:43
    关注

    编译FFmpeg for iOS 模拟器的过程中,一些参数的含义如下:

    • --cc: 指定编译器的路径,在这里指定为Xcode安装目录下的gcc。
    • --as: 指定汇编器的路径,在这里使用gas-preprocessor.pl脚本来预处理gcc汇编器生成的汇编文件。
    • --sysroot: 指定SDK的安装目录。
    • --extra-cflags: 指定额外的编译选项。在这里指定了-arch i386,表示编译出的代码运行在i386架构的CPU上;-miphoneos-version-min=4.3表示生成的代码至少要支持iOS 4.3及以上的版本;-mdynamic-no-pic表示不使用位置无关代码(Position-Independent Code)。
    • --target-os: 指定目标操作系统,在这里指定为darwin,表示编译出的代码运行在Darwin操作系统(包括Mac OS X和iOS)上。
    评论

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集