Search code examples
android-ndksuperpowered

Superpowered compile problems with Android NDK-r18


Android Studio has updated the NDK to r-18, which seems to have changed the C++ compiler, but it isn't clear what is wrong. We get the following error:

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage

The samples that comes with Superpowered release 1.2.4 also have this error when using Android Studio 3.2 RC3 with NDK-r18.

What needs to be done to fix the compilation?


Solution

  • Superpowered uses gnustl which has been removed from NDK r18.

    A recent answer on GitHub suggests that you can simply set ANDROID_STL to c++_static to resolve the problem with some Superpowered samples. Be careful with this approach, it may have sideeffects at runtime.

    It might be safer to stay with NDK r17 until the new release is officially embraced by the library.