How do you compile a C++ console program to run as an android process?
<p>I wrote a chess engine in C++ which I want to compile to run on the app "Chess for Android". </p>

<p>Here is an excerpt from a post from the author of the app who <a href="http://www.aartbik.com/MISC/uchess.html" rel="noreferrer">very very crudely</a> describes how to run a 3rd party chess engine on his app:</p>

<blockquote>
  <p>Finally, developers can do all development in C/C++ and generate stand-alone native code using the appropriate compiler toolchain (e.g. CodeSourcery for ARM or the toolchain that ships with the NDK). This third approach is used by Chess for Android to import engines that do not ship with the application.</p>
</blockquote>

<p>A chess engine is a straightforward program. The application runs, the user sends it commands, the program thinks, and will spit back a string with the details of the best move.</p>

<p>I do NOT need an app with graphics or anything else. it's ONLY a process which is communicated with via stdin/stdout (via pipes really). The "Chess for Android" app takes care of talking to the process, I just need to figure out how in the world to get my engine as a process that can be run by the "Chess for Android" app.</p>