我收到以下错误。
libxml/tree.h no such file or directory
我已经将 libxml2.dylib
添加到我的项目中,但是我遇到了这种类型的麻烦。
请帮帮我。
最佳答案
按照指示here ,在“设置您的项目文件”下。
Setting up your project file
You need to add libxml2.dylib to your project (don't put it in the Frameworks section). On the Mac, you'll find it at
/usr/lib/libxml2.dylib
and for the iPhone, you'll want the/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/usr/lib/libxml2.dylib
version.Since libxml2 is a .dylib (not a nice friendly .framework) we still have one more thing to do. Go to the Project build settings (Project->Edit Project Settings->Build) and find the "Search Paths". In "Header Search Paths" add the following path:
$(SDKROOT)/usr/include/libxml2
另见 the OP's answer .
关于objective-c - libxml/tree.h 没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1428847/