D on android and d_android

burt invalid_email_address at cab.abc
Wed Apr 1 13:20:19 UTC 2020

On Wednesday, 1 April 2020 at 11:57:58 UTC, Adam D. Ruppe wrote:
> On Wednesday, 1 April 2020 at 08:50:01 UTC, burt wrote:
>> I found a README [0] that mentions an "android-dub-build.d" 
>> script, which should be a wrapper around `dub build`
> Ah, I forgot to update that file. There is no android-dub-build 
> anymore, instead the android-setup changes the main 
> configuration file so plain `dub build` just works.
> So the correct steps now:
> 1) get ldc 1.19 specifically and the android NDK
> 2) do `android-setup /path/to/your/android/ndk`
> 3) do normal `dub build`

Thank you for your response, I managed to get a simple 
no-druntime-no-phobos app running with a function written in D.

Now I am trying to create a wrapper around a library that uses 
the runtime and phobos extensively, and even though the 
`libphobos2-ldc.a` and `libdruntime-ldc.a` files (created by 
`android-setup.d`) have been linked into the .a file that 
resulted from using
> dub build --compiler=ldc2 --arch=armv7a-none-linux-android
on my library, I still get linker errors telling me that symbols 
from phobos and druntime are undefined. (At least, I think I 
linked them in properly, because the size is approximately equal 
to the sizes of `libphobos2-ldc.a` and `libdruntime-ldc.a` added 
up.) Do you have any idea what could be wrong with my setup?

I am on windows and am using Android Studio v3.6.1, NDK 
21.0.6113669 and the newest version of LDC2.

Thanks in advance.

More information about the Digitalmars-d-learn mailing list