title: libgdal.so android error: could not load library "libgdal.so.1"
body: <p>My problem is the following: I have succesfully built <code>GDAL 1.10.1</code> using an Android toolchain <code>(CC=i686-linux-android-gcc, CXX=i686-linux-android-c++)</code> that produces the following output libraries <code>libgdal.a</code>, <code>libgdal.la</code>, <code>libgdal.lai</code>, <code>libgdal.so</code>, <code>libgdal.so.1</code>, <code>libgdal.so.1.17.1</code> in the output folder <code>.libs</code> (in the following I'll call this folder <code>$GDAL_LIB_PATH</code>).</p>
  
  <p>I am trying to build a simple Android app (a simple widget application with a <code>QPushButton</code> named <code>TestAndroid</code>) using Qt 5.4 on Windows. If I don't use GDAL everything works fine and I am able to run my app on an Android emulator for all available platforms: <code>x86</code>, <code>armeabi</code> and <code>armeabi-v7</code>.</p>
  
  <p>Nonetheless, if I try to use <code>GDAL</code> (ex. by simply calling <code>GDALAllRegister()</code> in the initialization of the app) and then linking to <code>libgdal.so</code> the application crashes with the following error:</p>
  
  <blockquote>
    <p>E/art     ( 1614):
    dlopen("/data/app/org.qtproject.example.TestAndroid-1/lib/x86/libTestAndroid.so",
    RTLD_LAZY) failed: dlopen failed: could not load library
    "libgdal.so.1" needed by "libTestAndroid.so"; caused by library
    "libgdal.so.1" not found</p>
  </blockquote>
  
  <p>I have verified that the Android platform is the right one (x86), otherwise the linker would skip the wrong <code>libgdal.so</code> object.</p>
  
  <p>I have included <code>libgdal.so</code> in the <code>*.apk</code> (generated by Qt) using <code>ANDROID_EXTRA_LIBS *= $GDAL_LIB_PATH/libgdal.so</code>. The other files <code>libgdal.so.x.x</code> cannot be included in the same way since Qt prevents it.</p>
  
  <p>In order to avoid dynamic linking I have also tried to link my app with <code>libgdal.a</code> but many link-time errors appears (ex. undefined reference to 'atof')</p>
  
  <p>I have searched on the web but I have not found a solution to my problem.</p>
  
  <p>I am not constrained to use dynamic linking so, a solution to any of the following problems is good for me:</p>
  
  <ol>
  <li><p>Is there a way to avoid the creation of <code>libgdal.so.x.x</code> files when building GDAL ?</p></li>
  <li><p>Is there a way to include <code>libgdal.so.x.x</code> files in the <code>*.apk</code> file generated by Qt ?</p></li>
  <li><p>How can I avoid link-time errors when linking the static library <code>libgdal.a</code> ?</p></li>
  </ol>
  
  <p>Thanks in advance for any reply!</p>