D-Lang-on-Android

This repository was created because there was information mismatches when looking to the D-Lang official wiki to Build D For Android

The main differences is that I show how to get the official LDC build for your environment, how to set your variables on Linux and I discovered one problem that was missing a /lib after the lib-dirs in ldc2.conf

Install Android Studio and get NDK

This is a very simple tutorial on how to do it as it has an infinitude of tutorials on how to get NDK for android Get Android Studio at https://developer.android.com/studio Finish installing it Go into the top right of your Android Studio IDE (taskbar) and search for SDK Manager Install the target SDK, currently the newest one is Android 10(Q), it is on “SDK Platforms” Selection Beside “SDK Platforms”, it has “SDK Tools”, click on it and select NDK, Android SDK Tools, Android SDK Platform-Tools, Android SDK Build-Tools then click on OK On the Top of the window, it has where SDK is located, you can always check it again for reference After that, just remember where your ndk is installed

Installing LDC on Linux

For installing LDC on Linux, I do not recommend getting it from the repository, instead, go to Dlang official installation website: D-Lang Official Install Website Then, get the D-Lang official installation script (install.sh) -> Direct link D-Lang Install Script After that, open the Bash and:

  • chmod +x ./install.sh
  • ./install.sh ldc Executing those commands will install it in your /home/currentUser/dlang (~/dlang) If you try to execute than ldc2(the current version), you will see that it is not available, the install script actually comes with -a parameter that lets you “activate”(Actually export important variables to your path), but for some reason, my linux is not exports command is not saving those variables. So what we’ll do is simply:
  • Go to ~/dlang/ldc(currentVersion)
  • Open activate with your favorite text editor
  • You will find the following lines in your text editor

#programming-languages #c #education #ds #programming #c++

D(“C++ Evolution”) programming on Android
1.30 GEEK