我收到以下错误。
libxml / tree.h没有这样的文件或目录
libxml/tree.h no such file or directory
我已经将 libxml2.dylib 添加到我的项目中,但是我遇到了这种类型的麻烦。 请帮助我。
I have already added libxml2.dylib to my project, however I am getting this type of trouble. Please help me.
推荐答案按照指示这里,在设置项目文件下。
Follow the directions here, under "Setting up your project file."
设置项目文件您需要将libxml2.dylib添加到您的项目中(不要不要把它放在框架部分)。在Mac上,你可以在 /usr/lib/libxml2.dylib 找到它,对于iPhone,你需要想要 /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/usr/lib/libxml2.dylib version。 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.
由于libxml2是一个.dylib(不是一个友好的.framework),我们还有一个b $ b还有一件事要做。转到项目构建设置(项目 - >编辑项目设置 - >构建)并找到搜索路径。 在页眉搜索路径中添加以下路径:
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
另见 OP的回答。
更多推荐
libxml / tree.h没有这样的文件或目录
发布评论