首页 文章

使用OSX gcc为arm7编译freetype2库时出错:`limits.h:没有这样的文件或目录

提问于
浏览
0

我正在尝试使用Xcode 's command line tools in OSX. I am using the following parameterisation of the project' s configure 脚本编译arm7的 freetype2 库:

Compiling FreeType for iPhone?

运行脚本时会产生这些错误:

configure: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:第1600行:/ lib / cpp:没有这样的文件或目录configure:3465:result:/ lib / cpp configure:3485:/ lib / cpp conftest.c / Volumes / DATA / filestore / development / libs / c / freetype2 / extract / 2.5.3 / builds / unix / configure:第1600行:/ lib / cpp:没有这样的文件或目录

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

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

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

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

*** UPDATED ***

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

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

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

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

这也表明正在构建不同的目标体系结构(OSX 10.6),而不是arm7 .

任何帮助非常感谢 .

1 回答

  • 0

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

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

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

相关问题