2013-03-18 51 views
1

我试图编译FFmpeg的针对iOS(对于iPhone5的,为了做一些RSTP流的东西)以下的tutorial here但我卡住与此错误:无法编译的ffmpeg的iOS

/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. 

我已经在计算器或与谷歌

任何想法,找到了其他脚本其他错误?


好(我在Mac环境还挺新),我设法通过SDK目标固定到最后的SDK我有(6.1)通过配置阶段,除去其它链接器标记,但随后的“使“命令是充满了错误的(无论是用gcc或臂苹果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 
+0

我注意到工作项目中没有设置**其他链接器标志**,而我的非工作项目设置了'-arch i386'。我删除了它,它似乎已修复它。如果问题未解决,则在静态库和主项目的项目设置中取消选中** Compile for Thumb **。 – 2013-03-18 11:15:26

回答

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 /本地/ bin/gas-preprocessor.pl“或”.../SDKs/iPhoneOS6.1.sdk“并将它们调整为您自己的路径/ SDK