zoukankan      html  css  js  c++  java
  • libxml/tree.h file not found

    stackoverflow用户对添加libxml2库表现出了极大的抱怨 ,原因在要把它好好地添加进去实在是太复杂了。

    我就是因为出现了'libxml/tree.h file not found’错误,才发现的这篇贴子,照着做,错误就消除了,备注如下:

    原始地址:http://stackoverflow.com/questions/1428847/libxml-tree-h-no-such-file-or-directory

    e.w. parris的答案

    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.


    You need to add it in two ways:

    1. 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 to your project.

    2. 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 projects 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 projects 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.

    3. Clean

    Under the Product Menu select Clean.

    Then, if I were you (and lets face it, I probably am) I'd quit Xcode and walk away. When you come back and launch you should be good to go.

  • 相关阅读:
    Spring Cloud
    如何修改容器时间而不改变宿主机时间?
    消息中间件 RabbitMQ 入门篇
    CentOS7下NFS服务安装及配置固定端口
    查看ssh有没有被黑的IP
    JVM常用命令和性能调优建议
    nfs高可用
    kafka集群部署以及单机部署
    OSGI企业应用开发(十三)OSGI Web应用开发(二)
    OSGI企业应用开发(十二)OSGI Web应用开发(一)
  • 原文地址:https://www.cnblogs.com/walkerwang/p/3835537.html
Copyright © 2011-2022 走看看