title: Android - Calling System.loadLibrary() causes process to die
body: <p>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."</p>
  
  <p>Here is the section of code where I load all the needed libraries and the game as a shared library.</p>
  
  <pre><code>    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"); // &lt;&lt; process dies when this is called
      }
  </code></pre>
  
  <p>libswm_jni.so was compiled with the Android NDK and in the Applicaion.mk file I specified</p>
  
  <pre><code>APP_STL := gnustl_static
  </code></pre>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Thanks in advance for any help with this headache of mine!</p>
  
  <p>-clark-</p>