Mach-O Linker error

两盒软妹~` 提交于 2019-12-08 02:56:23

问题


I am building ipad application in XCode 4. For that, i added some outside frameworks in my project. The code work fine in simulator but showing 24 Mach-O Linker error. I searched for this topic and get various different reasons for this error but not getting the right one. Any suggestion will be of great help.


回答1:


Most likely the library you are using has not been built for arm. For a library to work in the simulator, it must be compiled for i386 architecture. To work on the device, it must be compiled for armv architecture.

To work for both, you need what is called a "fat" binary that contains versions compiled for each of the above. If you don't have that, you will receive the linker errors.

To find out what architectures the library is compiled for, use the following command:

lipo -info mylibrary


来源:https://stackoverflow.com/questions/7497253/mach-o-linker-error

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