title: Embarcadero RAD Delphi 10.3.3, cannot compile my app with Box2D library for 64-bits Android
body: <p>Cannot compile my App for Android 64-bit with Delphi 10.3.3.
  My App is using Box2D library.
  While compile I get following errors:</p>
  
  <pre><code>[DCC Error] E2597 C:\Users\Public\Documents\Embarcadero\Studio\android-ndk-r17b\toolchains\aarch64-linux-android-4.9\prebuilt\windows\aarch64-linux-android\bin\ld.exe: cannot find -lFlatBox2D
  C:\Users\Public\Documents\Embarcadero\Studio\android-ndk-r17b\toolchains\aarch64-linux-android-4.9\prebuilt\windows\aarch64-linux-android\bin\ld.exe: cannot find -lgnustl_static
  </code></pre>
  
  <p>Compilation for Android 32-bit of same App is successful.
  Compilation of another my (simple) App for Android 64-bits works fine.</p>
  
  <p>So, I realized, that problem is only with Box2D for Android 64-bits used in my App.</p>
  
  <p>Then I also tested compilation of Box2D TestBed App that is coming with RAD (here <code>...\Embarcadero\Studio\20.0\Samples\Object Pascal\Multi-Device Samples\Physics\TestBed\</code>) - the same issue - it is compiled successfully for Android 32-bits, but same error when I'm compiling TestBed for Android 64-bits!</p>
  
  <p>Please help. Thousands of lines of code in my App already, and now it is full stop - can't build it for Android 64-bits [<strong>scared</strong>]</p>
  
  <p><strong>UPDATE1</strong></p>
  
  <p>Second error "cannot find -lgnustl_static" fixed by adding path <code>C:\Users\Public\Documents\Embarcadero\Studio\android-ndk-r17b\sources\cxx-stl\gnu-libstdc++\4.9\libs\arm64-v8a</code> into menu Tools->Options, then 'SDK Manager'->NDK->'Android SDK 25.2.5 64-bits'-> value for 'Delphi NDK Library path'.</p>
  
  <p>However, the first problem '<strong>cannot find -lFlatBox2D</strong>'still exists.
  I found only 2 files of library <code>libFlatBox2D.a</code> on my computer, it is </p>
  
  <pre><code>C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\android\debug
  C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\android\release
  </code></pre>
  
  <p>Both paths I added to the same 'Delphi NDK Library path' at SDK Manager for Android 64bit.
  However, now getting error message <code>skipping incompatible libFlatBox2D.a when searching for -lFlatBox2D</code> for each of these paths.</p>
  
  <p>So the question now - where to find a compatible libFlatBox2D.a that required for Android 64bits?</p>
  
  <p><strong>UPDATE2:</strong></p>
  
  <p>Hm... and in following 2 <code>android64</code> paths do not have any libFlatBox2D.a files.</p>
  
  <pre><code>C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\android64\debug
  C:\Program Files (x86)\Embarcadero\Studio\20.0\lib\android64\release
  </code></pre>
  
  <p>Does it mean, that 10.3.3 Delphi installation is missing 64-bits Box2D android library?</p>
  
  <p><strong>UPDATE3:</strong></p>
  
  <p>As answered by @Stefanos , now I have 64bit version of libFlatBox2D.a.
  But now while compiling I receiving count of 1700 linker errors about Box2D names , all of them similar to below:</p>
  
  <pre><code>[DCC Error] E2597 C:\Users\Public\Documents\Embarcadero\Studio\20.0\Samples\Object Pascal\Multi-Device Samples\Physics\TestBed\Android64\Debug\Box2D.Common.o: In function `Box2d::Common::Create_b2Draw_delegate(System::DelphiInterface&lt;Box2d::Common::Ib2Draw&gt;)':
    Box2D.Common:(.text._ZN5Box2d6Common22Create_b2Draw_delegateEN6System15DelphiInterfaceINS0_7Ib2DrawEEE[_ZN5Box2d6Common22Create_b2Draw_delegateEN6System15DelphiInterfaceINS0_7Ib2DrawEEE]+0x0): undefined reference to `Create_b2Draw_delegate'
    C:\Users\Public\Documents\Embarcadero\Studio\20.0\Samples\Object Pascal\Multi-Device Samples\Physics\TestBed\Android64\Debug\Box2D.Common.o: In function `Box2d::Common::Destroy_b2Draw_delegate(NativeUInt)':
    Box2D.Common:(.text._ZN5Box2d6Common23Destroy_b2Draw_delegateE10NativeUInt[_ZN5Box2d6Common23Destroy_b2Draw_delegateE10NativeUInt]+0x0): undefined reference to `Destroy_b2Draw_delegate'
    C:\Users\Public\Documents\Embarcadero\Studio\20.0\Samples\Object Pascal\Multi-Device Samples\Physics\TestBed\Android64\Debug\Box2D.Common.o: In function `Box2d::Common::b2Version_Create()':
    Box2D.Common:(.text._ZN5Box2d6Common16b2Version_CreateEv[_ZN5Box2d6Common16b2Version_CreateEv]+0x0): undefined reference to `b2Version_b2Version'
    C:\Users\Public\Documents\Embarcadero\Studio\20.0\Samples\Object Pascal\Multi-Device Samples\Physics\TestBed\Android64\Debug\Box2D.Common.o: In function `Box2d::Common::b2BlockAllocator_Create()':
    Box2D.Common:(.text._ZN5Box2d6Common23b2BlockAllocator_CreateEv[_ZN5Box2d6Common23b2BlockAllocator_CreateEv]+0x0): undefined reference to `b2BlockAllocator_b2BlockAllocator_1'
    C:\Users\Public\Documents\Embarcadero\Studio\20.0\Samples\Object Pascal\Multi-Device Samples\Physics\TestBed\Android64\Debug\Box2D.Common.o: In function `Box2d::Common::b2BlockAllocator_Destroy(NativeUInt)':
    Box2D.Common:(.text._ZN5Box2d6Common24b2BlockAllocator_DestroyE10NativeUInt[_ZN5Box2d6Common24b2BlockAllocator_DestroyE10NativeUInt]+0x0): undefined reference to `b2BlockAllocator_dtor'
  etc...etc...
  </code></pre>
  
  <p><strong>UPDATE4: Current status</strong></p>
  
  <p>I'm looking now for original <strong>libFlatBox2D.a</strong> library file for <strong>Android 64-bits</strong> (Delphi 10.3.3). If anyone has it, please share it with me.</p>
  
  <p>The above attempts were not successful. An 'original' 64bits libFlatBox2D.a is required, which is not in my installation of RAD 10.3.3...</p>
  
  <p><strong>UPDATE5:</strong></p>
  
  <p>Embarcadero QA created a ticket:
  <em><a href="https://quality.embarcadero.com/browse/RSP-27762" rel="nofollow noreferrer">https://quality.embarcadero.com/browse/RSP-27762</a></em>
  Will wait from their solution.</p>