title: 64 Bit Android compiling but has problems at runtime
body: <p>I have an Android App with a big C++ library which runs smoothly when compiled for </p>
  
  <pre><code>APP_ABI := armeabi-v7a  //32 bit
  </code></pre>
  
  <p>but has issues when compiled with </p>
  
  <pre><code>APP_ABI := arm64-v8a   //64 bit
  </code></pre>
  
  <p>All JNI jint variables have been converted to jlong variables according to the NDK docs. </p>
  
  <p>My problem is that for some reason I can not compare variables of any data type other than int when they are assigned from a function varible.</p>
  
  <p>This works:</p>
  
  <pre><code>unsigned long a = 200;
  unsigned long b = 200;
  if(a == b) {
      LOGE("got here"); //This works
  }
  </code></pre>
  
  <p>This fails:</p>
  
  <pre><code>void myClass::MyFunction(unsigned long c, unsigned long d) {
      if(c == d) {
          LOGE("got here"); //This does NOT work
      }
  }
  </code></pre>
  
  <p>Mind you, both above functions work in the 32 bit build. The values that I read from the variables c and d are identical when logged.</p>
  
  <p>Interestingly this works in the 64 bit version (int variables):</p>
  
  <pre><code>void myClass::MyFunction(int e, int f) {
      if(e == f) {
          LOGE("got here"); //This works
      }
  }
  </code></pre>
  
  <p>Only integers can be compared. I have tried long, double, long long, unsigned and signed...</p>
  
  <p>My NDK version is 10d (latest). I have tried with both, the 32 and 64 bit versions of the NDK and the result is the same. My development platform is a Win7 64 bit desktop.</p>
  
  <p>Am I missing somethign essential?</p>