将 C 代码 (netcat) 编译为原生 Android 可执行文件 [英] Compiling C code (netcat) to native Android executable

查看:29
本文介绍了将 C 代码 (netcat) 编译为原生 Android 可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个使用 Netcat 通过网络连接提供帧缓冲区的 bash 脚本,但首先我需要将它编译为本机可执行文件.我什至让这个脚本在默认安装了 netcat 的 Ubuntu 机器上运行.

I'm writing a bash script that uses Netcat to serve framebuffer over network connection, but first I need to compile it to native executable. I even got this script to work on a Ubuntu machine, where netcat is installed by default.

我发现了这个 https://github.com/android/platform_external_netcat 但没有 NDK 经验一点也不.这显然根本不使用 JNI 或 Java,因此制作 Android 应用程序的默认方法不会让我到任何地方.

I found this https://github.com/android/platform_external_netcat but have no experience in NDK at all. This obviously doesn't use JNI or Java at all so default approach for making Android applications won't get me anywhere.

所以问题是.如何从此源代码中获取可执行文件?

So the question is. How do I get an executable file from this source code?

推荐答案

查看 docs/STANDALONE-TOOLCHAIN.html 下的 Android sdk,它描述了如何使用 ndk 作为可以生成 arm 二进制文件的独立编译器.

Look in the Android sdk under docs/STANDALONE-TOOLCHAIN.html it describes how to use the ndk as standalone compiler which can produce arm binaries.

这篇关于将 C 代码 (netcat) 编译为原生 Android 可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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