我可以在Android上运行C / C ++程序吗? [英] Can I run a C/C++ program on Android?

查看:80
本文介绍了我可以在Android上运行C / C ++程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi
我知道C / C ++是一种跨平台语言,Android是一种操作系统。所以我应该能够在Android或其他操作系统(如iOS,Blackberry等)上运行在Windows或Linux中编写的C / C ++控制台程序。



是真的吗或不是?

提前致谢!

解决方案

查看 Android NDK [ ^ ]


比这更复杂,但是是的。可以编译和链接用C / C ++编写的程序,以便为编译器/链接器提供支持。该程序可以做什么取决于它所构建的平台上可用的库。



换句话说,你不能采用为Windows或Linux构建的程序并在Android上运行它,你需要专门为Android构建它。



要做到这一点,你要使用 Android原生开发工具包 [ ^ ]。

Hi I know C/C++ is a cross-platform language, and Android is an OS. So I should be able to run a C/C++ console program that wrote in Windows or Linux on Android or other OSes like iOS, Blackberry, etc.

Is it true or not?
Thanks in advance!

解决方案

Check out Android NDK[^]


It's a little more complicated than that, but yes. A program written in C/C++ can be compiled and linked for any OS/processor configuration there is a compiler/linker support for. What the program can do depends on what libraries are available on the platform it's built for.

In other words, you can't take a program built for Windows or Linux and run it on Android, you need to build it specifically for Android.

To do this, you use the Android Native Development Kit[^].


这篇关于我可以在Android上运行C / C ++程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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