I've decided to take on porting a game, that uses SDL libraries and makes heavy use of C++ and the STL, over to Android. I've been successful in getting all the required libraries compiled as well as all the source files for the game. My problem is that when I call System.loadLibrary() to load the .so for the game, the app immediately crashes with "Process org.libsdl.app (pid 3569) has died."
Here is the section of code where I load all the needed libraries and the game as a shared library.
static {
// Load the required libraries for the game
System.loadLibrary("SDL");
System.loadLibrary("SDL_image");
System.loadLibrary("SDL_mixer");
System.loadLibrary("SDL_net");
// load the game as a shared library
System.loadLibrary("smw_jni"); // << process dies when this is called
}
libswm_jni.so was compiled with the Android NDK and in the Applicaion.mk file I specified
APP_STL := gnustl_static
Since it crashes immediately after System.loadLibrary("smw_jni") with no meaningful error messages, I am at a loss as to how to go about getting to the root cause.
I've worked on porting another game which was just plain old C code, which worked out, so I am not sure if there is an issue with the fact that this particular game is heavy on the C++ side.
Thanks in advance for any help with this headache of mine!
-clark-