How to make VrCubeWorld_NativeACtivity examples run as C++ code instead of C code
I am exploring the VrCubeWorld_NativeActivity example in VrSamples of the Mobile SDK. I can successfully compile and run it on my oculus go using Android Studio. I would now like to start with that source code and modify it for my own project as a starting point as I am quite new to android/VR development. However, I would like to use C++ instead of C, but I am not able to compile the project as a C++ project. Renaming the file to a .cpp file and adding LOCAL_CPPFLAGS := -std=c++11 in Android.mk, does not work, Android Studio build fails with an org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':MyProjects:Test:Projects:Android'. exception. Is there a quick way to modify the VrCubeWorld_* examples in VrSamples so they compile as C++ code instead of C code? How should I modify the gradle files and .mk files? I am very new to gradle etc so that is still magic to me.871Views0likes2Comments