专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 移动开发

Undefined symbols for architecture xxx 异常

发布时间:2010-05-30 05:29:31 文章来源:www.iduyao.cn 采编人员:星星草
Undefined symbols for architecture xxx 错误

Undefined symbols for architecture xxx

referenced from: objc-class-ref in xxx.o

类似的问题碰过几次,相当挠头的,上次碰到是删除后,再重新覆盖文件,再拖放到项目中,莫名其妙就解决了。

今天再次碰到,试了几次都不行,在stackoverflow上找到一个帖子:

http://stackoverflow.com/questions/5403575/undefined-symbols-for-architecture-armv6-updating-to-ios-4-3

里面一个提到了可能是import参杂了一些特殊字符导致,这个估计可能是一种情况,不过对于我没帮助,我的问题解答是这个:

I added a .h, .m and NIB from another project by dragging them onto my project navigator. Xcode didn't add them to the Build Phases properly.

 

My solution for this problem:

 

Go to the Target in the navigator menu

Click on the "Build Phases" tab

Add the .m file to "Compile Sources" (either drag it across, or use the + button)

Add the .xib to "Copy bundle resources"

Clean and build

很奇怪,直接拖放文件有时候会不把文件放入编译路径,这似乎是个不稳定的情况,可能是XCode的bug吧。谨记之备忘。

友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: