Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have added libxml2 to my Xcode 4 project following this guide.

But it's not working. Xcode gives me error saying it no such libxml2 directory. What am I doing wrong? Here's the screenshots of the target settings of my project: enter image description here

enter image description here

Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
621 views
Welcome To Ask or Share your Answers For Others

1 Answer

  1. add ${SDKROOT}/usr/include/libxml2 to "Header Search Paths" instead of "User Header Search Paths" under yourtarget -> Build Settings -> Search Paths
  2. link with libxml2.dylib in yourtarget -> Build Phases -> Link Binary With Libraries
  3. include libxml2 headers with, for instance, #include <libxml/HTMLparser.h> and you're off

for better explanation see to this answer https://stackoverflow.com/a/3429301/149663


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...