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

报告相同问题?

悬赏问题

  • ¥30 vmware exsi重置后的密码
  • ¥15 易盾点选的cb参数怎么解啊
  • ¥15 MATLAB运行显示错误,如何解决?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 UE5#if WITH_EDITOR导致打包的功能不可用
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题
  • ¥20 yolov5自定义Prune报错,如何解决?
  • ¥15 电磁场的matlab仿真
  • ¥15 mars2d在vue3中的引入问题