Hello,
either I am mistaking something completely or the guidline in
www.pilotlogic.com/codetyphon/help/index...ure_your_applica.htm cannot work: It is suggested to install cross element arm-ANDROID but to select arm/LINUX as target in the compiler settings.
If I do so and try to compile, then I get
“fcllaz.pas(0,0) Fatal: Can not find unit system used by fcllaz of package FCL.”
IMHO this is because system.ppu/.o is only in the directories “C:\codetyphon\fpc\units\arm-android\rtl” and “C:\codetyphon\fpc\units\i386-win32\rtl” but when I select Linux as target then FPC obviously expects an arm-linux directory.
So, I have the following questions:
1. How shall FPC know that it has to choose the arm/android crossbuild if I select linux as target os?
2. Am I supposed to also build the arm/linux-crossbuild? If I do so, then FPC compiles fine but when linking it fails with “c:\codetyphon\fpc\bin\i386-win32\arm-linux-ld.exe: ERROR: Source object C:\Android\android-ndk-r8e\platforms\android-14\arch-arm\usr\lib\/libjnigraphics.so has EABI version 5, but target Laz_Android_4 has EABI version 0” and later “c:\codetyphon\fpc\bin\i386-win32\arm-linux-ld.exe: final link failed: Nonrepresentable section on output”
2.1. Am I supposed to rename arm-linux-androideabi-as/-ld/-strip.exe to arm-linux-as/ld/strip.exe? If I do so then the android-ndk-files link fine, but then I get “c:\codetyphon\fpc\bin\i386-win32\arm-linux-ld.exe: error: Source object C:\codetyphon\fpc\units\arm-linux\rtl\system.o has EABI version 0, but target Laz_Android_4 has EABI version 5”
2.2. Do I have to rebuild the rtl files of the arm-linux-crossbuild to be EABI version 5? How?
3. Am I supposed to select android as target OS instead? If I do so, then FPC complains “Laz_Android_3.lpr(13) Error: Assembler arm-android-as.exe not found, switching to external assembling”, which is true, there is no arm-android-as.exe.
3.1. Am I supposed to rename arm-linux-androideabi-*.exe to arm-android-*.exe? If I do so then compiling starts but I get “..\..\..\fpcsrc\packages\fcl-db\src\base\bufdataset_parser.pp(13,3) Fatal: Can't find unit dbf_prscore used by bufdataset_parser”. (IMHO this means that LCL is not ready for os-target android. I assume this is the reason why you recommend Linux as OS target instead.)
4. Can I select any android platform for –FI, e.g. C:\Android\android-ndk-r8e\platforms\android-14\arch-arm\usr\lib?
5. Is there really both LCLWidgetType1 and LCLWidgetType? What is the difference?
6. I assume that C:\Android\android-sdk is not used for compiling / linking. It is necessary after Lazarus’ job is done for creating the Android package, is it?
7. I do not see the “Cross GDB for arm-android” in Typhon. Why?
In case you want to know what I did:
I use Windows 7, 64 Bit.
I installed android ndk in C:\Android\android-ndk-r8e (the only slight difference to your description) and sdk in C:\Android\android-sdk
I installed CodeTyphon by calling install.bat as Administrator (right-click run as Administrator). (BTW: Here I had to add the line “cd C:\CodeTyphonIns” because when running as an Administrator Windows started the command line interpreter in another directory (I assume system32))
I started CodeTyphon as Administrator (and acknowledged UAC warning) and built Larzarus 32-Bit and “FPC21 cross build element arm-andriod”.
From CodeTyphon I started Lazarus. I used the empty project set –FI to “C:\Android\android-ndk-r8e\platforms\android-8\arch-arm\usr\lib\”, Target-OS to Android and Target-CPU family to ARM.
I set LCLWidgetType1 to customdrawn.
I hope someone can help me. Thanks in advance.