1.原因:
如果是源码编译的话,一般就只某些头文件没有添加到src编译里面。但是对于添加库编译,一般是库的编译路径设置不正确(比如arm的版本、模拟器或者真机的不同版本库引用错误或者重复引用一起编译器不知道如何选择)、或者库没有添加到lib path中。

2.解决:
2.1对于外部库真机和模拟器的库引用重复,可以参考
http://blog.csdn.net/forlong401/article/details/9304883
2.2 如果这些库是系统自带库,那就是在Build Phases的link binary with libraries里面添加即可。


3.参考(虽然很多写的都不太正确,但是可以参考一下):

http://my.csdn.net/kaixinnow2008/code/detail/4209

解决方法:
先点击方案(左边列表,点击方案的图示)
选择target
选择页签Build Phases
Compile Source
如果没展开的话先展开
向下找加号,点击加号,将这个target需要的.m档案的头文件都加入吧
(如果只有一个 就把左右的.h档案都加入)
这样就应该可以了

http://blog.csdn.net/itianyi/article/details/8499504

1,如何解决XCODE中错误: Undefined symbols for architecture i386 error

出现Undefined symbols for architecture i386这种错误一般是你用模拟器作为目标,但编译的时候找不到相关的库文件,需要做的就是把库文件所在的位置添加到library search path中。

其它原因可参考下面网址:http://stackoverflow.com/questions/6984368/undefined-symbols-for-architecture-i386-objc-class-skpsmtpmessage-refere

还有另外一个:http://stackoverflow.com/questions/6610709/undefined-symbols-for-architecture-i386

2,Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error

答案:You can get this type of error if your class' .m file is not listed under the "Compile Sources" step of the "Build Phases" tab of your target. Normally Xcode does this for you, but sometimes it loses the plot and you need to add the .m file manually.

   3,请问为什么在link with lib 种添加  libxml2.dylb  后  引用不了<libxml/tree.h>  老是找不到头文件?

答案:XCODE ,  Project -> Edit Project Settings -> Build Settings

You need to add “/usr/include/libxml2″ to the “Header Search Paths” and you need to add “-lxml2″ to the “Other Linker Flags”.

添加第三方类库造成的Undefined symbols for architecture i386:编译错误的更多相关文章

  1. iOS 错误 undefined symbols for architecture i386

    undefined symbols for architecture i386 这个错误困扰了我几个小时. 网上很多问这个问题的,回答基本上都是说在 target 里面去的 armv64 什么什么的. ...

  2. Undefined symbols for architecture i386

    这个错误的发生原因一般是“XXX”这个文件(类库)虽然引入了工程中,但是由于种种原因(常见于多人开发,svn同步不规范)导致“XXX”并未被添加到project.pbxproj这个文件中. 解决方法是 ...

  3. 当编译AFNetworking 2.0时出现了Undefined symbols for architecture i386

    当将AFNetworking添加到工程后编译时出现 Undefined symbols for architecture i386: "_SecCertificateCopyData&quo ...

  4. Undefined symbols for architecture i386: "_deflate", referenced from:

    Undefined symbols for architecture i386: "_deflate", referenced from: PlatCompress(enumCom ...

  5. Undefined symbols for architecture i386:和"_OBJC_CLASS_$_xx", referenced from:问题解决方法

    多个人共同操作同一个项目或拷贝项目时,经常会出现类似这样的问题: Undefined symbols for architecture i386: "_OBJC_CLASS_$_xx文件名& ...

  6. Undefined symbols for architecture i386: "MyGetOpenALAudioData(__CFURL const*, int*, int*, int*)"

    今天把apple developer上的例子程序oalTouch中的MyOpenALSupport.h和MyOpenALSupport.c添加到自己的工程中,并在另一个文件xxx.cpp里调用,结果出 ...

  7. Undefined symbols for architecture i386:"_OBJC_CLASS_$_xx", referenced from: 解决方法

    多个人共同操作同一个项目或拷贝项目时,经常会出现类似这样的问题: Undefined symbols for architecture i386: "_OBJC_CLASS_$_xx文件名& ...

  8. 【转】Undefined symbols for architecture i386:和"_OBJC_CLASS_$_xx", referenced from:问题解决方法

    多个人共同操作同一个项目或拷贝项目时,经常会出现类似这样的问题: Undefined symbols for architecture i386: "_OBJC_CLASS_$_xx文件名& ...

  9. 微信SDK导入报错 Undefined symbols for architecture i386:"operator delete[](void*)", referenced from:

    异常信息: Undefined symbols for architecture i386:  "operator delete[](void*)", referenced fro ...

随机推荐

  1. CreateMutex

    C++ API CreateMutex 找出当前系统是否已经存在指定进程的实例.假设没有则创建一个相互排斥体.CreateMutex()函数可用来创建一个有名或无名的相互排斥量对象. HANDLE C ...

  2. java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory

    java.lang.IllegalAccessError: tried to access field org.slf4j.impl.Static.. java.lang.IllegalAccessE ...

  3. 【iOS】iOS它Container View获得ViewController

    近期使用Container View来在主View Controller建立自己的子Controller,但是遇到问题.不知道怎样用代码获取Controller View附带的View Control ...

  4. C++ ofstream和ifstream具体的方法和C语言file说明

    ofstream是从内存到硬盘,ifstream是从硬盘到内存,事实上所谓的流缓冲就是内存空间; 在C++中,有一个stream这个类,全部的I/O都以这个"流"类为基础的,包含我 ...

  5. Java堆栈(转)

     Java栈与堆 ----对这两个概念的不明好久,最终找到一篇好文,拿来共享 1. 栈(stack)与堆(heap)都是Java用来在Ram中存放数据的地方.与C++不同,Java自己主动管理栈和堆, ...

  6. CSS3 实现六边形Div图片展示效果

    原文:CSS3 实现六边形Div图片展示效果 效果图: 实现原理: 这个效果的主要css样式有: 1.>transform: rotate(120deg); 图片旋转 2.>overflo ...

  7. POJ2533 Longest Ordered Subsequence 【最长递增子序列】

    Longest Ordered Subsequence Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 32192   Acc ...

  8. JBoss7官方下载最新版本

    JBoss是全世界开发人员共同努力的成果.一个基于J2EE的开放源码的应用server. 由于JBoss代码遵循LGPL许可,能够在不论什么商业应用中免费使用它.而不用支付费用. 2006年,Jbos ...

  9. WebIM(4)----Comet的特殊之处

    WebIM系列文章 在一步一步打造WebIM(1)一文中已经使用Comet实现了一个简单的WebIM,那么,Comet究竟和一般的打开网页有何区别,本文将通过编写一个简单的HTTP服务器来说明两者的区 ...

  10. JSON之FastJson

    FastJson是什么? 从网上查到--- 官网地址:http://code.alibabatech.com/wiki/display/FastJSON/Overview(已关闭) FastJSOn是 ...