
Open \etc\nf in a text editor and append a section like this, adapting lib and NDK paths as needed:.Extract the lib directory into your LDC installation directory and rename it, e.g., to lib-android_armv7a.Download the prebuilt android-armv7a package from GitHub matching the version of your LDC.Targeting 32-bit Android/ARMv7-A on a Win64 host:.See Cross-compiling with LDC for the general guide I present two examples for a quick summary: Once you have LDC and have unzipped the Android NDK, it's time to set up LDC for the desired Android target(s). LDC for Termux: apt install ldc With Android version 9 and earlier, the install will fail.



When using a device, you need some way to transfer the app over.I use actual hardware, so that's what I'll discuss. Android, whether a device or emulator, to run your D code.If using LDC from your distro or elsewhere, make sure it was built against our tweaked LLVM, otherwise it will not compile properly for Android. It's best to use an official release from GitHub, as it's built against a slightly tweaked LLVM with custom TLS emulation for Android targets.A recent LDC compiler for your host platform.The SDK is necessary to package a GUI app the NDK is enough if you just want to build a command-line binary.A recent version of the Android NDK and optionally the SDK.Any shell should work on Mac and Linux, typical commands for the bash shell are shown.Either a DOS command prompt or Powershell should work on Windows.A command shell on your host PC/Mac, where you'll run the LDC D compiler.8.1 Sign your app using a certificate and OpenSSL.8 Package an Android app from scratch on your Android device.5 Build a sample OpenGL ES 2.0 GUI app mostly written in D, with some Java.4 Build a sample OpenGL ES 1.0 GUI app ported to D.
