如何构建基于一个Makefile一个iPhone的静态库? [英] How to build an iPhone static library based on a Makefile?

查看:340
本文介绍了如何构建基于一个Makefile一个iPhone的静态库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功地建立起使用制作在命令行上OSX静态C库。

I have managed to build a static C library on OSX using make on the command line.

我曾尝试使用相同的Makefile(以 ARCHFLAGS = -arch的ARMv6 -arch的ARMv7 )建于iOS静态库,但它失败:

I have tried to use the same Makefile (with ARCHFLAGS=-arch armv6 -arch armv7) to build a static library for iOS, but it fails with:

gcc-4.2: error trying to exec '/usr/bin/arm-apple-darwin10-gcc-4.2.1': execvp: No such file or directory

我想这是不工作,因为我使用的OSX SDK做,而不是iOS SDK中的某些部分。任何线索?

I guess it is not working because I'm using the OSX SDK make instead of a some part of the iOS SDK. Any clues?

N.B。有关问题(levmar)库和Makefile文件的详细信息,请参阅<一个href=\"http://stackoverflow.com/questions/2539735/trying-to-build-the-levmar-math-library-on-a-mac-using-the-accelerate-framework/6063585#6063585\">this堆栈溢出的答案。

N.B. For more details on the library in question (levmar) and for the Makefile, please refer to this Stack Overflow answer.

推荐答案

您需要找到:


  • iOS的编译器的位置

  • 被在命令行中使用调用的命令行选项

最简单的方法是创建X code进行测试iPhone / iPad应用,建立它,然后看看生成日志来求x code如何调用编译器。

The easiest way is to create a test iPhone/iPad app in XCode, build it, and then look at the build log to find how XCode invokes the compiler.

这篇关于如何构建基于一个Makefile一个iPhone的静态库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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