【问题标题】:Error compiling freetype2 library for arm7 with OSX gcc: `limits.h: No such file or directory使用 OSX gcc 为 arm7 编译 freetype2 库时出错:`limits.h:没有这样的文件或目录
【发布时间】:2014-07-04 04:49:56
【问题描述】:

我正在尝试使用 Xcode 在 OSX 中的命令行工具为 arm7 编译 freetype2 库。我正在使用项目的configure 脚本的以下参数化:

Compiling FreeType for iPhone?

这些错误是在运行脚本时产生的:

配置:3426:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -E conftest.c 在 conftest.c:10 包含的文件中: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin10/4.2.1/include/limits。 h:15:25:错误:limits.h:没有这样的文件或目录

配置:3426:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -E -traditional-cpp conftest.c conftest.c:12:错误:assert.h:没有这样的文件或目录

配置:3426:/lib/cpp conftest.c /Volumes/DATA/filestore/development/libs/c/freetype2/extract/2.5.3/builds/unix/configure: line 1600: /lib/cpp: No such file or directory

配置:3465:结果:/lib/cpp 配置:3485:/lib/cpp conftest.c /Volumes/DATA/filestore/development/libs/c/freetype2/extract/2.5.3/builds/unix/configure: line 1600: /lib/cpp: No such file or directory

我可以看到错误消息中输出的目录中确实存在丢失的文件。

CFLAGSLDFLAGS 包含以下参数,应该允许包含系统头文件:

-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/

我注意到这些错误消息的另一件奇怪的事情是目录结构中的体系结构标识符是i686-apple-darwin10。正在使用 -arch armv7 编译器标志,那么为什么要检查 i686-apple-darwin10 目录呢?

* 已更新 *

我还尝试按照另一个示例参数化 configure 脚本:

https://stackoverflow.com/a/12594507/1704014

以下错误终止了它的执行:

正在检查本机可执行文件的后缀... ld: 找不到 -lcrt1.10.6.o 的库 collect2: ld 返回 1 个退出状态 配置:错误:本机 C 编译器不工作

这也表明正在构建不同的目标架构 (OSX 10.6),而不是 arm7。

非常感谢任何帮助。

【问题讨论】:

    标签: ios xcode gcc freetype2 arm7


    【解决方案1】:

    我的 OSX 构建环境中的问题是 Xcode 命令行工具安装。我重新安装了工具的最新发行版,并且从那时起能够成功编译。

    要为 arm7 和 arm7s 架构构建 freetype2 库,我发现以下建议的命令很有用:

    https://stackoverflow.com/a/12594507/1704014

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-05-21
      • 2015-09-01
      • 2013-12-04
      • 2021-10-31
      • 2018-03-05
      • 1970-01-01
      • 2012-11-09
      • 1970-01-01
      相关资源
      最近更新 更多