iphone - 在IOS6.1中构建FFMpeg错误无法创建可执行文件

标签 iphone objective-c ffmpeg

当我尝试像这样运行 ./configure 时,我正在尝试在 iOS6.1 (armv7) 上构建 ffmpeg:

./configure --disable-doc --disable-ffmpeg --disable-ffplay
--disable-ffserver    --enable-cross-compile --arch=arm --target-os=darwin    --cc=/applications/xcode.app/contents/Developer/usr/bin/gcc    --as='gas-preprocessor/gas-preprocessor.pl /applications/xcode.app/contents/Developer/usr/bin/gcc'   
--sysroot=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
--cpu=cortex-a8 --extra-cflags='-arch armv7'    --extra-ldflags='-arch armv7 -isysroot /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk'
--enable-pic

我收到以下错误:

/applications/xcode.app/contents/Developer/usr/bin/gcc is unable to create an executable file. C compiler test failed.



有人可以在 iOS6.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/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2 --as='gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2' --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



更新命令错误:

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



如果您认为配置出错,请确保您使用的是最新的
来自 Git 的版本。如果最新版本失败,请将问题报告给
ffmpeg-user@ffmpeg.org 邮件列表或 irc.freenode.net 上的 IRC#ffmpeg。
包括由 configure 生成的日志文件“config.log”,因为这将有所帮助
解决问题。

最佳答案

您正在使用...

--cc=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc

这对armv7是错误的,你应该这样做......
--cc=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1

将以上内容更改为 arm-apple-darwin10-gcc-x.x.x你有那个版本bin文件夹。

同样,将气体预处理器的目标编译器更改为相同。
--as='gas-preprocessor/gas-preprocessor.pl /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1'

此外,不要放置 -arch armv7在您的 --extra-cflags ,你不需要它,你可能会得到一个错误:unrecognized command line option "-arch"

关于iphone - 在IOS6.1中构建FFMpeg错误无法创建可执行文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17490937/

相关文章:

ios - setNeedsDisplay 已在主队列上提交但未被调用

ios - 将测试 iPhone 6S 更新到 11.1?

ios - 如何正确禁用 UIPickerView 组件滚动?

iphone - 如何使 subview 随其父 View 自动调整大小?

ios - 自动完成自定义值而不保存数据

android - ffmpeg 给 vcodec 两个参数

ios - 如何快速添加 subview Controller ?

ios - 应用捏合手势时 UILabel 的文本模糊

ffmpeg Stream map 'a:0' 不匹配任何流

audio - Gstreamer 使用 (uri)decodebin 从视频文件中播放音频 - 高 CPU 使用率