编译到设备时,会出现以下编译错误。 (当编译到模拟器时一切正常)
/ 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.
更多推荐
分支超出范围编译错误
发布评论