在Debug中链接的.dylib,在XCode中找不到适用于iPhone的Release [英] .dylib linked in Debug, not found for Release for iPhone in XCode

查看:90
本文介绍了在Debug中链接的.dylib,在XCode中找不到适用于iPhone的Release的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我将libxml2.2.dylib库包含到我的iPhone XCode项目中,以创建一些Xml和XPath解析实用程序。当我在模拟器和设备的调试模式下编译和运行时,我没有任何问题,但是,当我切换到发布模式时,我得到...

So I have included the libxml2.2.dylib library into my iPhone XCode project to create some Xml and XPath parsing utilities. When I compile and run in Debug mode for both the Simulator and Device I have no problems, however, When I switch to Release mode I get...

错误: libxml / tree.h:没有这样的文件或目录以及以下.h文件的其他类似错误。

"error: libxml/tree.h: No such File or directory" as well as other similar errors for the following .h files.

#import <libxml/tree.h>
#import <libxml/parser.h>
#import <libxml/HTMLparser.h>
#import <libxml/xpath.h>
#import <libxml/xpathInternals.h>

我需要做些什么才能确保包含libary并链接到Release版本?

What do I need to do to ensure the libary is included and linked to the Release build?

推荐答案

.h上的错误是您的标头搜索路径的编译时错误,而不是.dylib或链接器错误。

An error on the .h is a compile-time error with your Header Search Paths, not a .dylib or a linker error.

您必须确保 $ {SDK_DIR} / usr / include / libxml2 位于您的页眉搜索路径中您的发布配置。

You have to ensure that ${SDK_DIR}/usr/include/libxml2 is in your Header Search Paths in your Release configuration.

这篇关于在Debug中链接的.dylib,在XCode中找不到适用于iPhone的Release的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆