Author Topic: dwindows for Android  (Read 262 times)


  • Sr. Member
  • ****
  • Posts: 336
    • SamadhiWeb
dwindows for Android
« on: December 16, 2022, 01:25:55 pm »
Continuing from the 'GTK3 proposal' thread, another baby step taken! I've now gotten my littlest demo to run on Android, on emulator and phone. Emulator screenshot attached.

Some notes:

- Android Studio uses Gradle as its build system. For 'native' projects, Gradle calls CMake. I can't quite get CMake to run FPC cross compiler from within Android Studio yet. So I build the Pascal shared library using shell script, then have CMake incorporate the shared library into the final artefact.

- For 32-bit ARM, the Gnu binutils cross linker is not able to produce the Pascal shared library:
Code: Text  [Select][+][-]
  1. Assembling dwindows
  2. Assembling dwprunner
  3. Linking armeabi-v7a/
  4. /home/pierce/pkg/cross/arm-linux-androideabi/bin/arm-linux-androideabi-ld.bfd: error:
  5. source object /home/pierce/pkg/android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/29/crtbegin_so.o
  6. has EABI version 5, but target armeabi-v7a/ has EABI version 0
Code: Text  [Select][+][-]
  1. % file *.o
  2. dwindows.o:  ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
  3. dwprunner.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
So I have no idea what's happening here.

I'll look into iOS next.

Edit: iOS thread here:,61621.0.html
« Last Edit: December 17, 2022, 06:32:44 am by PierceNg »


TinyPortal © 2005-2018