Mach O Link Error- linker command failed with exit code 1 (use -v to see invocation)

可紊 提交于 2019-12-19 18:55:26

问题


When I try building for archiving for my app in Xcode (version 4.5) I get an error that says:

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/[myrealname]/Downloads/[myappname]/BT_Objects/TwitterOAuth/SAOAuthTwitterEngine/libOAuth.a for architecture armv7s

clang: error: linker command failed with exit code 1 (use -v to see invocation) It then says under it:

(null): File is universal (3 slices) but does not contain a(n) armv7s slice: /Users/shakerite/Downloads/shakeritetestnotrealone_v15_iOS/BT_Objects/TwitterOAuth/SAOAuthTwitterEngine/libOAuth.a for architecture armv7s

Does anyone know how to solve this?


回答1:


I received a very similar message just the other day when I tried running my app on my iPad after several successful attempts on the simulator. I found out that under the build settings I had to make "build active architecture only" to yes. Then my app would compile on my device. Hope this helps.




回答2:


Yeah, I had this same exact problem. Click on your project in xcode. Then, click on the target. Go to build settings and look for valid architectures. Delete armv7s from the list of valid architectures and just leave armv7.

Let me know if you have any questions!




回答3:


here I provide you one temporary solution that can solve this error hope its help you,

go to Project->Build Settings->Build Active Architecture Only->yes

thats it.



来源:https://stackoverflow.com/questions/12591711/mach-o-link-error-linker-command-failed-with-exit-code-1-use-v-to-see-invocat

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