在IOS6.1中构建FFMpeg错误无法创建可执行文件
我试图在iOS6.1(armv7)上构建ffmpeg,当我尝试运行如下所示的./configure时:
./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无法创建可执行文件。 C编译器测试失败。
有人可以在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无法创建可执行文件。 C编译器测试失败。
如果您认为配置出错,请确保您使用的是Git的最新版本。 如果最新版本失败,请将问题报告给irc.freenode.net上的ffmpeg-user@ffmpeg.org邮件列表或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
  将上述内容更改为任何具有该bin文件夹的arm-apple-darwin10-gcc-xxx版本。 
同样,将气体预处理器的目标编译器更改为相同。
--as='gas-preprocessor/gas-preprocessor.pl /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1'
  另外,不要在你的--extra-cflags放置一个-arch armv7 --extra-cflags ,你不需要它,你可能会得到一个错误: unrecognized command line option "-arch" 
上一篇: Building FFMpeg Error in IOS6.1 unable to create an executable file
下一篇: O Linker Error
