iphone - 为 IOS 编译 ffmpeg(R_ABS reloc 错误)

标签 iphone ios compiler-construction linker ffmpeg

我一直在尝试为 IOS 编译 ffmpeg 库。如果我使用--disable-asm,我可以让它工作,但为了性能,我想在启用它们的情况下构建。

这是我使用过的许多配置命令之一。
./configure --prefix=armv7 --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avresample --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc" --extra-cflags="-arch armv7 -miphoneos-version-min=5.0" --extra-ldflags="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -miphoneos-version-min=6.0" --arch=arm --cpu=cortex-a9 --disable-everything --enable-pic --enable-static --disable-shared
它编译得很好,但是当我尝试在我的项目中链接它时,我得到:

ld:在/ffmpeg/libavcodec/libavcodec.a(simple_idct_armv5te.o) 中,在 _TEXT,_text reloc 0 节中:R_ABS reloc 但在架构 armv7 的目标地址处没有绝对符号

我错过了一些关键选项吗?我试过使用 1.0 版本和最新的 git 版本的 ffmpeg。

最佳答案

我遇到了同样的问题。我的解决方案是切换到更新的 gas-preprocessor.pl,可以在这里找到:https://github.com/mansr/gas-preprocessor

只需安装它来代替您当前使用的旧版本。

关于iphone - 为 IOS 编译 ffmpeg(R_ABS reloc 错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13944482/

相关文章:

compiler-construction - 如果内存是字节可寻址的,为什么我们有对齐填充?

C# - 值类型等于方法 - 为什么编译器使用反射?

iphone - 如何从十六进制值转换为 UIColor?

iphone - 生成大型 PDF 文件缩略图导致 iPhone/iPad 崩溃

ios - 在背景中为 map 添加注释

ios - 在 viewDidLoad 中模拟按钮点击

ios - 如何在持久 Canvas 上绘图并将其绘制在 View 内?

parsing - 为什么左递归、非确定性或二义性文法不能是 LL(1)?

ios - MFMailComposerViewController 不发送电子邮件

iphone - 更改 iPad 方向时 Xcode 4.5 出现问题