问题:
![[转载]duplicate <wbr>symbols <wbr>for <wbr>architecture <wbr>i386 [转载]duplicate <wbr>symbols <wbr>for <wbr>architecture <wbr>i386](https://i-blog.csdnimg.cn/blog_migrate/4e16c77412cd8baf896358a34b89ee91.jpeg)
解决方法:
You've included "filexxx" in your project twice.
It's possible that another library (such as sharekit) included it for you, doublecheck the files sharekit includes and remove one copy of
"filexxx"
and things should compile.
。
今天我碰到了这样一个问题,是在做别人完成的项目中 添加和修改一些问题于是我就创建了一个类,之后运行就出现上面的问题 2 duplicate symbols for architecture i386的问题。经过查找资料,这样的问题就是你创建了和原来项目中相同的一个类,发生了冲突,只要你删除其中的一个类或这将类名改不一样的就可以了。然后运行就OK了。
从网上查资料也有这样解决的:
一个项目中不可能有两个main入口吧。删除不需要的那一个,ok了。
还有一种,Undefined symbols for architecture i386:
说明缺少某种框架,或者类。
根据提示进行添加某些框架或者类。
这两种情况一般在多个人进行开发,或者多个项目进行整合、复用代码拷贝的时候,往往出现这种问题。