title: Android NDK - make two native shared libraries calling each other
body: <p>Wasted half a day trying to build two shared libraries, e.g. <code>mod1</code> and <code>mod2</code> (which Android NDK compiles to <code>libmod1.so</code> and <code>libmod2.so</code>), from sources in a jni folder and sub-folders, then have mod1 call a function from mod2. Plenty of answers on how to make the build work, but then runtime dynamic linking was not working, the app crashed on startup.</p>
  
  <p>Decided to post this question and immediately answer it, so that Q and A to the whole process are together, and hopefully someone else won't waste a day researching it again.</p>