I'm trying to decide if using C++ to create an Android app is sensible. I've tried to use Java for what I want, but it simply doesn't have the language features I need.
I see a bunch of things written as C/C++, but everyone of them are actually 'C' examples.
I'd like to build a simple C++ app (NOT 'C') to better understand how to do this in Android. I've read some about the NDK which seems to support C++, but I don't know to what extent.
Is there a sample C++ project out there? One that has real C++ and not C code inside a .cpp file? An "Hello World" program would be fine. Simple is good to start.
Please pass by this question if you want to answer with how C++ wraps a 'C' function. If the example doesn't address name mangling, it's not C++. No extern 'C' please. Thanks for understanding.
NDK works really fine. It is so simple that you have your .cpp and .h written in C++, compile them with ndk-build, and you have your android code including the cpp's like explained this tutorial shows:
Good luck: Part 1 Part 2
Official documentation: Sample applications
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With