现在的位置: 首页 > 综合 > 正文

libxml/tree.h’ file not found and ARC和非ARC 之间转换

2018年08月21日 ⁄ 综合 ⁄ 共 566字 ⁄ 字号 评论关闭

今天运行了下程序 直接报红-- 'libxml/tree.h' file not found

看看Header Search Paths 为

 '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/libxml2'

看看Base SDK 为 ios 6.1

于是把Header Search Paths 该为

 '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/libxml2'

问题解决,但是有一个问题,如果这样做的话每升级一次版本就要修改一次。

正确做法因该是Header Search Paths 该为    ${SDKROOT}/usr/include/libxml2


1,选择项目中的Targets,选中你所要操作的Target,
2,选Build Phases,在其中Complie Sources中选择需要ARC的文件双击,
     并在输入框中输入:-fobjc-arc,如果不要ARC则输入:-fno-objc-arc

抱歉!评论已关闭.