LibXML2.dylib 和 Xcode4
我刚刚下载了 Xcode 4,但似乎无法运行我的应用程序,因为 MGTwitter... 类抱怨 LibXML2 的不包含错误。我已将其导入到框架文件夹中,并将以下内容放入构建设置的标题位中,
$(SDKROOT)/usr/include/libxml2
但我仍然收到 65 个错误。
有什么想法如何解决这个问题吗?
I just downloaded Xcode 4 and I cant seem to run my application as the MGTwitter... classes are complaining of a non inclusion error of LibXML2. I have imported it into the frameworks folder, and I have put the following in the header bit in the build settings
$(SDKROOT)/usr/include/libxml2
But I am still getting 65 errors.
Any ideas how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(11)
试试这个:
“$(SDK_DIR)”/usr/include/libxml2
Try this:
"$(SDK_DIR)"/usr/include/libxml2
LibXML2 库解决了
围绕这个问题的许多困惑。
解决方案
如果您有 Xcode 4.3.x 和 Xcode 4.3.x /Application 文件夹中的 Xcode 4.5
必须仅添加:应用程序目标中的 /usr/include/libxml2 >标头搜索路径。
双击该行,在小窗口上单击加号并写入 /usr/include/libxml2
nb - 还需要将 libxml2.dylib 添加到框架中。我用的是2.2.7.3
希望对你有帮助
LibXML2 library solved
Many confusion around this issue.
SOLUTION
if you have both Xcode 4.3.x & Xcode 4.5 in /Application folder
must add ONLY: /usr/include/libxml2 in Application TARGET > Header search path.
For this double click on the line, on little window click plus sign and write /usr/include/libxml2
nb - need also add libxml2.dylib to the framework. I use 2.2.7.3
hope help you
是
。这对我有用。
yes
.This works for me.
如果单击“全部”和“组合”,则转到“搜索路径”部分。确保将 $(SDK_DIR)/usr/include/libxml2 添加到“标头搜索路径”部分,而不是“库搜索路径”部分。
If you click on "All" and "Combined" go down to the Search Paths section. Make sure you add $(SDK_DIR)/usr/include/libxml2 to the "Header Search Paths" section and not the "Library Search Paths" section.
您还需要添加框架 libxml2.dylib
You need to add also the framework libxml2.dylib
将用户标头搜索路径清空,并
写入
$(SDK_DIR)"/usr/include/libxml2
在库搜索上方的标头搜索路径中 路径
Make User Header Search paths empty and write
$(SDK_DIR)"/usr/include/libxml2
in Header Search paths which is above the Library Search Paths
我认为所选答案更好。然而这对我有用:
我只是拖放。
我不知道为什么它有效。老程序员就是这么干的。我想应该有一个我们可以包含的框架,应该没问题吧?
另外,其他计算机可能在该位置没有 libxml2.dylib 文件,并且可能会出现问题。
I think the selected answer is better. However this one worked for me:
I just drag and drop.
I do not know why it works. It's how the old programmer do it. I suppose there should be a framework we can include and that should be fine?
Also other computers may not have file libxml2.dylib in that exact spot and things may go wrong.
请试试这个:
Please try this one:
-lxml2
添加到“其他链接器标志”属性-I/usr/include/libxml2
添加到“其他 C 标志”属性-lxml2
to the Other Linker Flags property-I/usr/include/libxml2
to the Other C Flags property我也遇到了 xcode4.6 这个问题,
我添加了libxml2.dylib
在标头搜索路径中添加:: "/usr/include/libxml2"
并添加了“AdSupport.framework”及其对我的作用。
I also faced this issue for xcode4.6 ,
i added libxml2.dylib
in header search path added :: "/usr/include/libxml2"
and added "AdSupport.framework" and its work for me.
如果要将其放入设备中,则需要在“Release”类别中添加“$(SDK_DIR)/usr/include/libxml2”,而不是在“Header Search Path”下的“Debug”类别中添加。
You need to add "$(SDK_DIR)/usr/include/libxml2" in "Release" Category rather then in "Debug" Category under "Header Search Path" if you are putting it into a device.