gpt4 book ai didi

ios - 无法为 iOS 编译 ffmpeg

转载 作者:行者123 更新时间:2023-11-29 13:17:04 29 4
gpt4 key购买 nike

我正在尝试在 tutorial here 之后为 iOS 编译 FFmpeg(对于 iPhone5,为了做一些 RSTP 流式传输的东西)但我遇到了这个错误:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc is unable to create an executable file.
C compiler test failed.

在我的 config.log 文件中我有这个:

BEGIN /var/folders/9g/zv_vdz7x16g1hgx9pqj57zz80000gn/T//ffconf.D3a73otQ.c
1 int main(void){ return 0; }
END /var/folders/9g/zv_vdz7x16g1hgx9pqj57zz80000gn/T//ffconf.D3a73otQ.c
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -arch armv7 -mfpu=neon -miphoneos-version-min=6.0 -mcpu=cortex-a9 -c -o /var/folders/9g/zv_vdz7x16g1hgx9pqj57zz80000gn/T//ffconf.Wv4eZtHX.o /var/folders/9g/zv_vdz7x16g1hgx9pqj57zz80000gn/T//ffconf.D3a73otQ.c
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -miphoneos-version-min=6.0 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -o /var/folders/9g/zv_vdz7x16g1hgx9pqj57zz80000gn/T//ffconf.y84bbrJt /var/folders/9g/zv_vdz7x16g1hgx9pqj57zz80000gn/T//ffconf.Wv4eZtHX.o
ld: library not found for -lcrt1.3.1.o
collect2: ld returned 1 exit status
C compiler test failed.

我在 stackoverflow 或 google 上发现的其他脚本有其他错误

有什么想法吗?


好的(我是 mac 环境的新手),我设法通过将 sdk 目标固定为我拥有的最后一个 sdk (6.1),删除其他链接器标志,但随后“make”命令已满错误(使用 gcc 或 arm-apple-darwin10-gcc-4.2):

In file included from ./libavutil/internal.h:113,
from ./libavutil/common.h:385,
from ./libavutil/avutil.h:238,
from libavdevice/version.h:28,
from libavdevice/avdevice.h:22,
from libavdevice/alldevices.c:22:
./libavutil/libm.h:53: error: static declaration of ‘cbrt’ follows non-static declaration
./libavutil/libm.h:60: error: static declaration of ‘cbrtf’ follows non-static declaration
./libavutil/libm.h:86: error: expected identifier or ‘(’ before ‘sizeof’
./libavutil/libm.h:96: error: expected identifier or ‘(’ before ‘sizeof’
./libavutil/libm.h:142: error: static declaration of ‘rint’ follows non-static declaration
./libavutil/libm.h:149: error: static declaration of ‘lrint’ follows non-static declaration
./libavutil/libm.h:156: error: static declaration of ‘lrintf’ follows non-static declaration
./libavutil/libm.h:163: error: static declaration of ‘round’ follows non-static declaration
./libavutil/libm.h:170: error: static declaration of ‘roundf’ follows non-static declaration
./libavutil/libm.h:177: error: static declaration of ‘trunc’ follows non-static declaration
./libavutil/libm.h:184: error: static declaration of ‘truncf’ follows non-static declaration
make: *** [libavdevice/alldevices.o] Error 1

最佳答案

./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='/usr/local/bin/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk --cpu=cortex-a8 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk' --enable-pic --enable-decoder=rawvideo --disable-asm

您还必须关心像“--as=/usr/local/bin/gas-preprocessor.pl”或“.../SDKs/iPhoneOS6.1.sdk”这样的路径,并使它们适应您自己的路径/开发工具包

关于ios - 无法为 iOS 编译 ffmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15475302/

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