XCode 5 GM 链接器错误:架构 i386 的函数 anon 中的紧凑展开信息过多
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18731667/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
XCode 5 GM linker error: too many compact unwind infos in function anon for architecture i386
提问by dang
We just updated to XCode 5 GM, and a project (iPhone only targeted at iOS 7) that built fine under DP 5 now gives the error:
我们刚刚更新到 XCode 5 GM,一个在 DP 5 下构建良好的项目(iPhone 仅针对 iOS 7)现在给出了错误:
ld: in /Users/dan/Documents/Projects/ImageProApp/Pods/SparkInspector/SparkInspector.framework/SparkInspector(ExplorerViewState.o), too many compact unwind infos in function anon for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
We are using CocoaPods to include several components, CocoaAsyncSocket, CocoaLumberack, Spark Inspector and Reachability. My guess is that were we to remove Spark Inspector, this error would simply reference another component.
我们使用 CocoaPods 来包含几个组件,CocoaAsyncSocket、CocoaLumberack、Spark Inspector 和 Reachability。我的猜测是如果我们删除 Spark Inspector,这个错误只会引用另一个组件。
Can anyone recommend a fix? Tell me what the compiler/linker flags are to use non-compact unwind infos?
任何人都可以推荐一个修复程序吗?告诉我编译器/链接器标志是什么来使用非紧凑展开信息?
Thanks,
谢谢,
Dan
担
回答by Mike Vosseller
UPDATE: Google released a fix for the Google Analytics library https://code.google.com/p/analytics-issues/issues/detail?id=338
更新:谷歌发布了谷歌分析库的修复 https://code.google.com/p/analytics-issues/issues/detail?id=338
See version v3.01 here: https://developers.google.com/analytics/devguides/collection/ios/resources
在此处查看 v3.01 版:https: //developers.google.com/analytics/devguides/collection/ios/resources
FWIW, with the Google Analytics library, the link error only happens when deployment target is set to 7.0. If you drop the deployment target to 6.1 for example linking works without error.
FWIW,使用 Google Analytics 库,仅当部署目标设置为 7.0 时才会发生链接错误。例如,如果您将部署目标降低到 6.1,则链接工作不会出错。
For reference, with respect to Google Ananlytics, I've posted an issue in Google's bug tracker.
作为参考,关于 Google Ananlytics,我在Google's bug tracker 中发布了一个问题。
回答by ray
Workaround:Build for device.
解决方法:针对设备构建。
Not so much of a fix, but try building your app for a device rather than simulator. Might be related to the introduction of 64-bit.
不是修复,而是尝试为设备而不是模拟器构建您的应用程序。可能与 64 位的引入有关。
I can archive my app, but when I try to build/run for simulator, it fails at linking with the same error you're receiving.
我可以存档我的应用程序,但是当我尝试为模拟器构建/运行时,它无法链接到您收到的相同错误。
To be clear, I'm also using cocoapods.
需要明确的是,我也在使用 cocoapods。
回答by Shaz
changing " iOS Deployment Target to something less than "iOS 7.0"
将“iOS 部署目标”更改为“iOS 7.0”以下的内容
inside
里面
"Project" -> Build Settings -> Deployment
“项目”-> 构建设置-> 部署
worked for me, i guess it has something to do with the configuration used to build the external lib. i was facing the issue with the simulator only, when included Jot Touch SDK
对我来说有效,我想这与用于构建外部库的配置有关。当包含 Jot Touch SDK 时,我只面临模拟器的问题
回答by dirtydanee
this answer might come a little late, but i had the same issue with a third party framework. For some reason we have added the -all_load flag to the build settings, but when i removed it, we were able to build the project.
这个答案可能来得有点晚,但我在使用第三方框架时遇到了同样的问题。出于某种原因,我们在构建设置中添加了 -all_load 标志,但是当我删除它时,我们能够构建项目。
So go to:
所以去:
Project -> Build Settings -> Other linker flags
项目 -> 构建设置 -> 其他链接器标志
and remove the -all_load flag.
并删除 -all_load 标志。
Hope this helps.
希望这可以帮助。