Xcode armv7 issue

两盒软妹~` 提交于 2019-12-08 09:31:04

问题


My application builds fine for the simulator but not the device:

ld: warning: ignoring file /Users/newuser/Downloads/release-1.5-tag/build/Release-iphoneos/parsekit.a, file was built for archive which is not the architecture being linked (armv7)

I'm using the ParseKit lib which doesn't seem to like being mixed with armv7.

I think I have to do some form of linking with the library? But how?

Thanks.


回答1:


You seem to have linked the library, only it is not built for armv7.

The ParseKit Xcode project has a target called ParseKitMobile, which is built for armv7. Try using that.

You could also try changing the "Base SDK" setting to iOS, that should give you arm options for the architecture.




回答2:


Chances are that you'll have to re-compile ParseKit for the armv7 architecture. Are you following the instructions for iPhone on the ParseKit homepage? It does not seem to mention armv7 explicitly, but I guess if you add parsekit.a as a target from ParseKit's project file to your own project file, then XCode should recognize that the target has to be re-built for armv7.

Note: the instructions are for XCode 3 and I guess you are using XCode 4, but the whole idea should be the same.




回答3:


parsekit.a is a static library and it has to be statically linked with binaries having the same ABI. So you have following options:

  1. Build you code for the same ABI as parsekit.a has;
  2. Build parsekit.a for the armv7;
  3. Build parsekit as a shared library;
  4. Write wrapper for parsekit.a that will be built as shared library and expose all the API you need.


来源:https://stackoverflow.com/questions/7214789/xcode-armv7-issue

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