libxml/tree.h no such file or directory
来源:互联网 发布:一切用数据说话啥意思 编辑:程序博客网 时间:2024/05/18 01:51
Works for me. Remember to add the library in Link Binary en Build Phases Section of the target project.
You need to put all the libxml headers on the include path. For Xcode do this by adding/usr/include/libxml2
to the header paths (that will pass -I/usr/include/libxml2 to the c compiler)
This is in the build settings tab in Search Paths -> Header Search Paths
There's just a few simple steps:
- Copy the RaptureXML/RaptureXML folder into your own project and import "RXMLElement.h" somewhere (e.g., your PCH file).
- Link in libz.dylib to your target.
- Link in libxml2.dylib to your target.
- In your build settings, for the key "Header Search Paths", add "$(SDK_DIR)"/usr/include/libxml2
RaptureXML supports ARC. In fact, it does so without a branch. The code automatically detects if ARC is being used in your project and compiles accordingly. You are free to use any version of LLVM or gcc as well! (Though you should be using LLVM by now.)
Adding libxml2 in Xcode 4.3.x
Adding libxml2 is a big, fat, finicky pain in the ass. If you're going to do it do it before you get too far in building your project.
Here's how.
Target settings
Click on your target (not your project) and select "Build Phases". Click on the reveal triangle titled "Link Binary With Libraries". Click on the "+" to add a library. Scroll to the bottom of the list and select "libxml2.dylib". That adds the libxml2 library 2 your project… but wait.
Project settings
Now you have to tell your project where to look for it three more times.
Select the "Build Settings tab". Scroll down to the "Linking" section. Under your project's columns double click on the "Other Linker Flags" row. Click the "+" and add "-lxml2" to the list.
Still more.
In the same tab, scroll down to the "Search Paths" section. Under your project's column in the"Framework Search Paths" row add "/usr/lib/libxml2.dylib".
In the "Header Search Paths" AND the "User Header Search Paths" row add"$(SDKROOT)/usr/include/libxml2". In those last two cases make sure that path is entered in Debug AND Release.
Then. Under the "Product" Menu select "Clean".
Then, if I were you (and let's face it I probably am) I'd quit Xcode and walk away. When you come back and launch you should be good to go.
- libxml/tree.h no such file or directory
- Libxml/tree.h:No such file or directory错误
- libxml/tree.h no such file or directory
- Libxml/tree.h:No such file or directory错误
- IOS XMPP引入时产生错误信息 “libxml/tree.h no such file or directory”
- libxml/xmlversion.h: No such file or directory
- libxml/xmlversion.h: No such file or directory
- error: libxml/xmlversion.h: No such file or directory
- libxml/xmlversion.h: No such file or directory
- fatal error: libxml/parser.h: No such file or directory解决方法
- nspr.h: No such file or directory
- stdio.h: No such file or directory
- “fstream.h”: No such file or directory
- dxtrans.h": No such file or directory
- dxtrans.h": No such file or directory
- Python.h:No such file or directory
- crtdbg.h: No such file or directory
- sk_stdint.h: No such file or directory
- android笔记
- Ubuntu上Oracle VM VirtualBox安装和配置
- android4.0 avd模拟器的默认路径修改默认AVD的路径一般为系统用户目录下,WIN7下为C:\Users\Administrator\
- MySQL配置文件参数解释
- POJ 1083 Moving Tables
- libxml/tree.h no such file or directory
- CAsyncSocket
- linux下摄像头驱动分类
- Mysql 字符集
- Oracle VM VirtualBox上安装ubuntu
- 在Qt Creator2.0 中叫出智能提示
- vs2010下Error1error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStart
- RPC工具:Thrift与ProtocolBuffer
- InvalidateRect()与Invalidate()的用法(转)