LibXML2.dylib and Xcode4

2019-01-13 14:28发布

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?

11条回答
走好不送
2楼-- · 2019-01-13 14:35

Make User Header Search paths empty and write

$(SDK_DIR)"/usr/include/libxml2

in Header Search paths which is above the Library Search Paths

查看更多
Animai°情兽
3楼-- · 2019-01-13 14:36

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

查看更多
唯我独甜
4楼-- · 2019-01-13 14:38

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.

查看更多
聊天终结者
5楼-- · 2019-01-13 14:40

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.

查看更多
姐就是有狂的资本
6楼-- · 2019-01-13 14:42

Try this:

"$(SDK_DIR)"/usr/include/libxml2

查看更多
我只想做你的唯一
7楼-- · 2019-01-13 14:47
  1. Always search user path mark it yes.
  2. Then, remove all previous paths that you have defined manually.
  3. Clean all target.
  4. Analyze or build again.

This works for me.

查看更多
登录 后发表回答