Cross platform compiler for C++
Which is the best cross platform compiler for C++ to compile for android devices... I only need cross compiler without ide if possible... I know their are C++ compilers for Android but that is not exactly what I'm asking... I want to compile my C++ project into .apk for android devices...
1/11/2018 10:17:13 PMMayank
3 AnswersNew Answer
GCC + Bionic or G++ + Bionic work on android ( C4droid APP)
just an additional info, there is MinGW which allowing you to compile with g++ on the same os for the other operating systems!
You can't compile a pure C++ program into an apk. You can write parts of your program, even very substantial parts, in C++ then call the C++ routines using the Java Native Interface (JNI). To do this requires the Android Native Development Kit (NDK). You can write pure C/C++ programs but these are not apk programs they are command line programs. I've successfully cross compiled gnu make to run on Android as well as the ASxxxx cross assemblers. These command line tools need to be executed in a terminal program on the device. Be warned, cross compiling for Android is not for the faint of heart or people who want a life away from a computer screen.