在编译Xcode项目(IPhone)时出错 [英] Error while compiling the Xcode project (IPhone)

查看:201
本文介绍了在编译Xcode项目(IPhone)时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将ffmpeg iphone端口添加到我的库中,我可以使用其中的一些功能,如avcodec_init(),..没有任何错误。
但是当我包含这个函数调用avcodec_register_all编译后Xcode发生错误



错误信息是:



* ---------------
ld:ldr _CFRelease $ stub _CFRelease $中的12位位移超出范围(4276最大+/- 4096) stub从/Users/foxit/Documents/CameraTest/build/CameraTest.build/Debug-iphoneos/CameraTest.build/Objects-normal/armv6/CameraTest



命令/开发人员/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2失败,退出代码1



* -------------



有谁知道这是什么问题?



问候,



Raghu

解决方案

在Xcode中构建时,这个问题存在于iPhone OS 3.1或更高版本中。尝试在目标的链接库阶段重新创建库的链接顺序。我已经在以下讨论了这个问题: http://www.galloway.me.uk/2009/12/ldr-12-bit-displacement-out-of-range/



有是iPhone SDK 3.1及更高版本中固有的问题。将不得不等到苹果修复它,否则我们将不得不做一些跟踪和错误更改。



在我们的例子中,只需重新排序libavfilter和libavcodec到最后只需工作。


I added ffmpeg iphone port into my library and I can able to use a few of its functions like avcodec_init(),.. without any errors. But when I include this function call "avcodec_register_all" Xcode is giving error after compilation

The error message is :

*--------------- ld: ldr 12-bit displacement out of range (4276 max +/-4096) in _CFRelease$stub in _CFRelease$stub from /Users/foxit/Documents/CameraTest/build/CameraTest.build/Debug-iphoneos/CameraTest.build/Objects-normal/armv6/CameraTest

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

*-------------

Does anyone know whats wrong with this ?

Regards,

Raghu

解决方案

This problem exists in iPhone OS 3.1 or later while building in Xcode. Try re-arringing the link order of the libraries in your target's link library phase. I have discussed this issue in: http://www.galloway.me.uk/2009/12/ldr-12-bit-displacement-out-of-range/

There is an inherent problem in iPhone SDK 3.1 and later. Will have to wait until Apple fixes it or we will have to do some trail and error changes.

In our case, just re-ordering libavfilter and libavcodec to the last would simply work.

这篇关于在编译Xcode项目(IPhone)时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆