工程添加文件提示错误" _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。

你可能感兴趣的:(Class)