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)上。
    评论

报告相同问题?

悬赏问题

  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题