libxml/tree.h no such file or directory

后端 未结 22 2923
刺人心
刺人心 2020-11-27 10:47

I am getting following errors.

libxml/tree.h no such file or directory

I have already added libxml2.dylib to my pro

22条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-27 11:11

    Please follow the following steps

    1. Adding libxml2
      libxml2.dylib can be found on your mac machin at /usr/lib/libxml2.dylib

    2. Change "Header Search Paths"
      Click on [Project Name] (in left panel) -> Project -> Build Settings -> Select All (default is Basic)
      Type Header Search Paths in search box
      Double click on Header Search Paths -> + -> "$(SDKROOT)/usr/include/libxml2"

    3. Add -lxml2 to "Other linker flag"
      Search for "Other Linker Flags" as search in step 2
      click on the "Other Linker Flags" row. Click the "+" and add "-lxml2" to the list.

    4. Change your project type to ARC -> No i.e Automatic Reference Counting to No You can search ARC as per in step 2

提交回复
热议问题