工程添加文件提示错误" _OBJC_CLASS_$_***View"

工程添加文件后,提示错误:
file was built for archive which is not the architecture being linked (i386) Undefined symbols for architecture i386:
 "_OBJC_CLASS_$_MyView", referenced from:objc-class-ref in ViewController.o

解决办法:

选中你的项目名称,然后在中间选中TARGETS下面第一项(就是你项目名称那个)然后在右边选中Build Phases里面Compile Sources( items)下拉项,在里面添加你会出现这个错误的文件的.m文件。然后ok。

posted @ 2014-05-08 09:22  swu_luo  阅读(307)  评论(0编辑  收藏  举报