Linking in Android NDK (No Java)

(Matt Peterson) #1

I’ve read that it is necessary to call System.loadLibrary from java on android, but I’m using a completely java-free environment (C++ in a Visual Studio 2015 Android, iOS, and Windows Universal project).

Is there any way to load the library using C++?

(Mathew Block) #2

System.LoadLibrary is required to properly load Android dependencies and ensure they have access to the Java environment. The internals of FMOD use Java to implement some APIs as there is no native equivalent.

I’m not familiar with the native Visual Studio 2015 Android integration but I’d expect there is a way to provide Java code. We use the NVidia Android integration for Visual Studio and it works well allowing both C++ and Java code within the IDE.