分支超出范围编译错误

编程入门 行业动态 更新时间:2024-10-07 20:28:47
本文介绍了分支超出范围编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

编译到设备时,会出现以下编译错误。 (当编译到模拟器时一切正常)

/ var / folders / 3B / 3BAjD + ANHHmfh-eIWrtXDU +++ TI / -Tmp - / cc-hojnUD.s:1784380:branch 超出范围 /var/folders/3B/3BAjD+ANHHmfh-eIWrtXDU+++TI/-Tmp-/cc-hojnUD.s:1784372 :branch 超出范围 /var/folders/3B/3BAjD+ANHHmfh-eIWrtXDU+++TI/-Tmp-/cc-hojnUD.s:1784364:branch 超出范围 /var/folders/3B/3BAjD+ANHHmfh-eIWrtXDU+++TI/-Tmp-/cc-hojnUD.s:1784356:branch 超出范围

在各个地方,我读到关于关闭Thumb的东西。我真的不知道这是否会解决这个问题,因为我找不到这个编译选项在任何地方。

我有一些很大的init文件(超过50k line)

我不能让我的应用程序为iPhone编译因为这个错误。

你有什么想法我能做些什么吗?

ps。我使用Xcode 4.2与Apple LLVM 3.0(使用ARM,所以我不能更改编译器)

非常感谢!

解决方案

(从注释中移除)。您的init文件是一个巨大的函数吗?如果是这样,它可能有助于将函数分成更小的片段,并有一个主函数按顺序调用这些片段。

I get the following compile errors when compiling to the device. (When compiling to simulator everything is OK)

/var/folders/3B/3BAjD+ANHHmfh-eIWrtXDU+++TI/-Tmp-/cc-hojnUD.s:1784380:branch out of range /var/folders/3B/3BAjD+ANHHmfh-eIWrtXDU+++TI/-Tmp-/cc-hojnUD.s:1784372:branch out of range /var/folders/3B/3BAjD+ANHHmfh-eIWrtXDU+++TI/-Tmp-/cc-hojnUD.s:1784364:branch out of range /var/folders/3B/3BAjD+ANHHmfh-eIWrtXDU+++TI/-Tmp-/cc-hojnUD.s:1784356:branch out of range

In various places I read something about turning off "Thumb". I don't really know if this would resolve the issue since I can't find this compile option anywhere.

I have some pretty large init files (with more than 50k lines) doing nothing else but defining NSMutuable array and stuf like that.

I can't get my app to compile for the iPhone anymore because of this error.

Do you have any idea what I can do about this?

ps. I use Xcode 4.2 with Apple LLVM 3.0 (using ARM, so I can't change the compiler)

Many thanks!

解决方案

(Moved from comment). Is your init file one huge function? If so, it may help to break the function into smaller pieces and have a master function call the pieces in order.

更多推荐

分支超出范围编译错误

本文发布于:2023-10-23 02:27:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1519471.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分支   错误

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!