Superpowered compile problems with Android NDK-r18

300 Views Asked by At

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?

2

There are 2 best solutions below

2
On BEST ANSWER

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.

0
On

Superpowered has been updated to NDK r18 and Android Studio 3.2.