ndk-samples
ndk-samples copied to clipboard
A hello-jni++ project would be useful
Hi Everyone,
I help manage a C++ library. The library supports Android. We are fairly strict about the flags we use for the project. When building on Android we want to ensure we always use the same flags as the Android project.
Ndk-samples provides a hello-jni project for C programs and libraries. We currently use ndk-build and hello-jni to obtain most of the flags we need to match Android flags. However, it is missing C++ specific flags the Android project might use, like -stdlib=libc++ and -std=c++11.
It would be very useful if ndk-samples provided a hello-jni++ project for C++ projects. A hello-jni++ would provide developers with the reference implementation and flags.
Thanks in advance.
Here are the steps we use to determine the C flags.
android$ git clone https://github.com/googlesamples/android-ndk
android$ cd android-ndk
android$ git checkout android-mk
android$ cd hello-jni
android:hello-jni$ ndk-build APP_PLATFORM=android-23 V=1
...
Sounds like that you needs to port those building flags (including the default ones set by gradle and ndk-build tool), correct?
As best as I can tell you're asking for https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md.