Click here to Skip to main content
16,006,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
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!
Posted
Updated 20-Jan-15 22:04pm
v2

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[^].
 
Share this answer
 
Comments
Leo Chapiro 21-Jan-15 5:28am    
Well explained, +5 !
Orjan Westin 21-Jan-15 5:35am    
Thank you. :)
Check out Android NDK[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900