构建 XMLRPC.framework:错误的架构?
又是我的 iOS 问题。我终于成功构建了这个 XML-RPC 框架的主分支 https://github.com/eczarny/xmlrpc 它为我生成了一个 XMLRPC.framework。我设法将该框架包含在我的 iOS 项目中,一切都很好,但是当我构建它时......
ld: warning: ignoring file /Users/kovshenin/Library/Developer/Xcode/DerivedData/XMLRPC-emidbddzjlofthfgowywcfscewgd/Build/Products/Development/XMLRPC.framework/XMLRPC,
file was built for unsupported file format which is not the architecture being linked (i386)
所以我回到 XMLRPC 项目并尝试为目标选择不同的基础 SDK 和架构,但没有运气,似乎它只是为 64 位 Intel 构建的。甚至尝试了 iOS SDK,它给了我一个“所选的运行目的地对此操作无效”。错误。
再次抱歉我的“新手”言论,但官方开发论坛似乎无法帮助我。谢谢!
PS我使用的是Xcode 4。
it's me again with my iOS trouble. I've finally managed to build the master branch of this XML-RPC framework https://github.com/eczarny/xmlrpc which produced an XMLRPC.framework for me. I managed to include that framework in my iOS project, all good, but when I build it...
ld: warning: ignoring file /Users/kovshenin/Library/Developer/Xcode/DerivedData/XMLRPC-emidbddzjlofthfgowywcfscewgd/Build/Products/Development/XMLRPC.framework/XMLRPC,
file was built for unsupported file format which is not the architecture being linked (i386)
So I went back to the XMLRPC project and tried to select different Base SDKs and Architectures for the target, but with no luck, seems like it's only building it for 64-bit Intel. Even tried the iOS SDK which gives me a "The selected run destination is not valid for this action." error.
Sorry again for my "newbish" talk, but the official dev forums can't seem to help me out. Thanks!
P.S. I'm using Xcode 4.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
架构与运行代码的处理器有关。如果您正在为模拟器进行构建,那么您正在为您的 Mac(即 Intel、i386)进行构建。如果您正在为物理 iOS 设备进行构建,那么您正在为 arm6 或 arm7 进行构建,具体取决于设备的新旧程度。第四代 iPhone 4 和 iPad 是第一款 ARM7 设备。
至于设置构建设置,我建议查看构建设置。在 Xcode 中。这是屏幕截图:
单击您的项目,然后单击您的构建。在架构部分下,您可以根据需要配置架构。 但您应该注意,原始开发人员必须为模拟器和设备构建它,否则您将无法在模拟器上运行它。
Architecture is related to the processor on which you are running your code. If you are building for the simulator, then you are building for your Mac, which is Intel, i386. If you are building for a physical iOS device, then you are building for arm6 or arm7, depending on how new the devices are. Fourth generation iPhone 4 and iPad were the first arm7 devices.
As far as setting the build settings, I'd recommend taking a look at the build settings. In Xcode. Here's a screenshot:
Click on your project, then on your build. Under the architectures section, you can configure your architectures as necessary. You should note though, that the original developer would have to have built it for the simulator as well as the device, or you won't be able to run it on the simulator.
看起来这个库可能不胖,这意味着它只会为设备构建,而不是为模拟器构建。连接您的设备并在下拉列表中选择它,然后再次构建并查看错误是否消失。
It looks as though the library may not fat meaning it'll only build for the device, and not for the simulator. Connect your device and select it in the drop down, then build again and see if the error disappears.