我收到以下错误.
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版本.
Setting up your project fileYou 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),我们仍然还有一件事要做.转到项目构建设置(项目->编辑项目设置->构建)并找到搜索路径".在标题搜索路径"中添加以下路径:
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 没有这样的文件或目录
发布评论