iOS:有人获得了 libtar 或 libarchive 来构建吗? (配置脚本有问题。)

发布于 2024-12-05 23:44:22 字数 121 浏览 1 评论 0原文

我在构建具有“配置”脚本的库时遇到问题,即此类脚本不适用于为 iOS 进行编译。

是否有一组环境变量可供我设置以诱导“配置”适用于 iOS?

我尝试设置 CC,但这还不够。

谢谢。

I'm having a problem building libraries that have a "configure" script, namely such scripts are not meant for compiling for iOS.

Is there a set of environment variables that I can set to induce "configure" to work for iOS?

I tried setting CC but that was not nearly enough.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怀念你的温柔 2024-12-12 23:44:22

具有适用于 iOS 的静态库和标头的 Github 项目

来自自述文件(2011 年 11 月):

LibArchive iOS 静态库不幸的是,虽然
libarchive.dylib 和 libbz2.dylib 包含在 iOS SDK 中,
头文件不是。这意味着它们是私有 API,不能
如果您打算提交到 App Store,请使用。

永远不要害怕!该存储库包含构建一个项目所需的一切
适用于 iOS 的 libarchive 静态版本。 libbz2 也包含在内
额外的善良。

为了保持命名的合理性,我们将库构建为 libarc.a。

对于 iOS 4.3+,从
build-for-iOS-4.3 目录到您的项目中。

对于 iOS 4.2,从以下位置复制头文件和库
build-for-iOS-4.2 目录到您的项目中。

如果您需要为早期版本的 iOS 构建此版本,您可以
轻松修改 build.sh 脚本以指向您喜欢的任何 SDK。
它应该可以在 3.x 上正常构建。

要使其完全链接,您还必须在列表中包含 libz.dylib
链接库。要在 XCode 4 中执行此操作,请单击您的项目,
选择“构建阶段”选项卡,转到“链接二进制文件与库”,然后按
+,然后从可能的库(长)列表中选择 libz.dylib 进行链接。这是因为 libarc.a 动态链接到 libz.dylib
-- 这没关系,因为无论出于何种原因,AAPL 认为适合将 libz 标头包含在 iOS SDK 中。

当前的 libarchive 版本是 2.8.4。 bzlib2版本是1.0.6。

Github project with static libraries and headers that build properly for iOS.

From the readme (Nov 2011):

LibArchive Static Library for iOS Unfortunately, while
libarchive.dylib and libbz2.dylib are included in the iOS SDK, the
header files are not. This means that they are private APIs and cannot
be used if you intend to submit to the App Store.

Never fear! This repository contains everything you need to build a
static version of libarchive for iOS. libbz2 is also included for
extra goodness.

To keep naming of things sane, we build the library as libarc.a.

For iOS 4.3+ copy the header files and library from the
build-for-iOS-4.3 directory into your project.

For iOS 4.2 copy the header files and library from the
build-for-iOS-4.2 directory into your project.

If you need to build this for an earlier version of iOS, you can
easily modify the build.sh script to point to whatever SDKs you like.
It should build fine on 3.x.

TO GET IT FULLY LINKING you must also include libz.dylib in your list
of linked libraries. To do this in XCode 4, click on your project,
choose the Build Phases tab, go to Link Binary With Libraries, press
+, and choose libz.dylib from the (long) list of possible libraries to link against. This is because libarc.a links dynamically to libz.dylib
-- this is okay since, for whatever reason, AAPL saw fit to include the libz headers in the iOS SDK.

The current libarchive version is 2.8.4. The bzlib2 version is 1.0.6.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文