gpt4 book ai didi

ios - iFrameExtractor 无法使用 XCode 4.3.3 和 iOS 5.1 为 armv7 构建库

转载 作者:行者123 更新时间:2023-12-04 23:30:57 26 4
gpt4 key购买 nike

我已经从这个链接下载了使用 XCode 4.3.3 for iOS 5.1 构建的代码 - https://github.com/lajos/iFrameExtractor
我能够使用 build_universal 脚本成功地为 FFmpeg 构建库。但它总是为 X86_64 架构构建库。用 lipo -info 命令检查。

还尝试了链接中的构建脚本 - http://stexgroup.com/blog/ffmpeg-for-iphone-ios-xcode4.3-build-script .它还为 X86_64 架构构建库。

我根据这篇文章更改了脚本 - problem compiling ffmpeg for iFrameExtractor

但没有什么对我有用。

armv7 [iFrameExtractor] 的构建脚本如下

./configure \
--disable-bzlib --disable-doc \
--disable-ffmpeg --disable-ffplay \
--disable-ffserver --disable-mmx \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--enable-cross-compile --target-os=darwin \
--arch=arm --cpu=cortex-a8 --enable-pic \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk \
--extra-ldflags="-arch armv7 - L//Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib" \
--extra-cflags="-arch armv7"

考虑到同样的事情对其他人有用,谁能指导我可能是什么问题?

最佳答案

使用以下脚本,我可以构建库。这些脚本是 Far Pointer 在此链接中共享的脚本的修改版本 - problem compiling ffmpeg for iFrameExtractor

armv6

#!/bin/tcsh -f

if (! -d armv6) mkdir armv6
if (! -d lib) mkdir lib

rm armv6/*.a

make clean

./configure \
--disable-bzlib --disable-doc \
--disable-ffmpeg --disable-ffplay \
--disable-ffserver --disable-mmx \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--enable-cross-compile --target-os=darwin \
--arch=arm --cpu=arm1176jzf-s \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk \
--extra-ldflags="-arch armv6 -L//Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/system" \
--extra-cflags="-arch armv6"

make

mv libavcodec/libavcodec.a armv6/
mv libavdevice/libavdevice.a armv6/
mv libavformat/libavformat.a armv6/
mv libavutil/libavutil.a armv6/
mv libswscale/libswscale.a armv6/

rm lib/*.a

cp armv6/*.a lib/

armv7
#!/bin/tcsh -f

if (! -d armv7) mkdir armv7
if (! -d lib) mkdir lib

rm armv7/*.a

make clean

./configure \
--disable-bzlib --disable-doc \
--disable-ffmpeg --disable-ffplay \
--disable-ffserver --disable-mmx \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--enable-cross-compile --target-os=darwin \
--arch=arm --cpu=cortex-a8 --enable-pic \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk \
--extra-ldflags="-arch armv7 - L//Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/system" \
--extra-cflags="-arch armv7"

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/

i386
#!/bin/tcsh -f

if (! -d i386) mkdir i386
if (! -d lib) mkdir lib

rm i386/*.a

make clean

./configure \
--disable-bzlib --disable-doc \
--disable-ffmpeg --disable-ffplay \
--disable-ffserver --disable-mmx \
--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor/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/iPhoneOS5.1.sdk \
--extra-ldflags="-arch i386 -L//Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/lib/system" \
--extra-cflags="-arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -O0 -fasm-blocks -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2"

make

mv libavcodec/libavcodec.a i386/
mv libavdevice/libavdevice.a i386/
mv libavformat/libavformat.a i386/
mv libavutil/libavutil.a i386/
mv libswscale/libswscale.a i386/

rm lib/*.a

cp i386/*.a lib/

现在的问题是所有脚本都为 armv6 架构构建库。有没有人遇到这样的问题?

关于ios - iFrameExtractor 无法使用 XCode 4.3.3 和 iOS 5.1 为 armv7 构建库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11451503/

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