Building XMLRPC.framework: Wrong Architecture?

血红的双手。 提交于 2019-12-08 13:29:28

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/6492322/building-xmlrpc-framework-wrong-architecture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!