我如何编译使用NDK现有的C程序为Android? [英] How do I compile an existing C program for Android using NDK?

查看:223
本文介绍了我如何编译使用NDK现有的C程序为Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写一个Android应用程序,以测试网络的性能,我想用iperf的在应用程序。我能找到已经编译为Android二进制iperf的文件(然后我可以在手机上运行的iperf和收集它的输出),但我感兴趣的编译文件喽。

I am writing an Android app to test network performance, and I want to use iPerf in the app. I can find binary iPerf files already compiled for Android (and then I can run iPerf on the phone and collect its output) but I'm interested in compiling the files myself.

下面,有人$可用于编译程序P $ psents脚本: <一href="http://sourceforge.net/tracker/index.php?func=detail&aid=3533374&group_id=128336&atid=711373" rel="nofollow">http://sourceforge.net/tracker/index.php?func=detail&aid=3533374&group_id=128336&atid=711373

Here, someone presents scripts that can be used to compile the program: http://sourceforge.net/tracker/index.php?func=detail&aid=3533374&group_id=128336&atid=711373

我知道,它需要NDK,但我不知道从哪里开始。是否有良好的资源或建议,可以帮助指导我对我自己编写这(在Windows上,但我也有Cygwin的)。我知道C和如何使用GCC在Linux上,但我不知道从哪里开始在这里。

I know that it requires the NDK but I don't know where to start. Are there any good resources or advice that can help guide me to compiling this on my own (on Windows, but I also have Cygwin). I know C and how to use GCC on linux, but I'm not sure where to start here.

感谢提前任何帮助!

推荐答案

啊,这个链接有我一直在寻找的信息,任何人都... <一href="http://stackoverflow.com/questions/10798357/want-to-compile-native-android-binary-i-can-run-in-terminal-on-the-phone">Want编译原生的Andr​​oid二进制我可以在终端上的电话运行

Ahh, this link has the information I was looking for, for anyone else... Want to compile native Android binary I can run in terminal on the phone

这篇关于我如何编译使用NDK现有的C程序为Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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