我想编译iOS5的ffmpeg库。我尝试了不同的选择,但都没有工作为iOS5编译FFMPEG时遇到的大问题
我下载了这个:https://github.com/ciphor/ffmpeg4ios。
我试过原始的build_armv7,但没有奏效。我编辑的build_arm7文件,现在它看起来像这样:
#!/bin/tcsh -f
if (! -d armv7) mkdir armv7
if (! -d lib) mkdir lib
rm armv7/*.a
make clean
./configure --disable-network --disable-mpegaudio-hp --disable-lpc --disable-vaapi
--disable-vdpau --disable-hwaccels --disable-mmx --disable-mmx2 --disable-sse
--disable-ssse3 --disable-avx --disable-amd3dnow --disable-amd3dnowext --disable-vis
--disable-mmi --disable-doc --disable-yasm --disable-ffmpeg --disable-ffplay
--disable-ffprobe --disable-ffserver --disable-rdft --disable-dxva2 --disable-encoders
--disable-decoders --enable-decoder=h264 --disable-bsfs --disable-protocols
--disable-indevs --disable-outdevs --disable-devices --disable-filters --disable-demuxers --enable-demuxer=h264
--disable-muxers --disable-parsers --enable-parser=h264 --enable-cross-compile --arch=arm
--target-os=darwin
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 --as='gas-preprocessor/gas-preprocessor.pl /Aplications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2'
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk --cpu=cortex-a8
--extra-cflags='-pipe -Os -gdwarf-2 -issysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -m${thumb_opt:-no-thumb}
-mthumb-interwork' --extra-ldflags='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk' --enable-pic
make
mv libavcodec/libavcodec.a armv7/
mv libavdevice/libavdevice.a armv7/
mv libavformat/libavformat.a armv7/
mv libavutil/libavutil.a armv7/
mv libswscale/libswscale.a armv7/
rm lib/*.a
cp armv7/*.a lib/
,但我得到这个错误:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 is unable to create an executable file. C compiler test failed.
我找遍了整个互联网。我已阅读关于此stackoverflow的所有帖子,但没有帮助我。请告诉我我做错了什么,请不要张贴我的链接:相信我,我看到了他们!
我试过这个,我不再收到那个错误。但是在我输入“make”命令后,我收到了这个错误:错误:.endm没有.macro在/usr/local/bin/gas-preprocessor.pl 83行, 53行。 –
苹果有一个过时的气体预处理器特等。我已经用这个替换它https://github.com/yuvi/gas-preprocessor –
在我的情况下,当我输入make命令我得到:command not found,我该怎么办? – Swati