Difference between revisions of "Android"

From Lazarus wiki
Jump to navigationJump to search
(Created page with "= Android = Currently support for android target is present in the trunk (development) version 2.7.1 of FPC. Supported CPUs: * ARM * i386 == Building cross compiler == Che...")
 
Line 6: Line 6:
 
* ARM
 
* ARM
 
* i386
 
* i386
 +
 +
== Android NDK ==
 +
 +
You need to download and install Android NDK in order to compile programs for the android target.
 +
Download Android NDK using this link:
 +
http://developer.android.com/tools/sdk/ndk/index.html
 +
 +
Extract it to some folder.
 +
 +
== FPC sources ==
 +
 +
Check out the latest trunk sources of FPC using the following command:
 +
 +
<code>svn co FPC http://svn.freepascal.org/svn/fpc/trunk</code>
 +
 +
Now you have the compiler sources in the <tt>FPC</tt> sub-folder.
  
 
== Building cross compiler ==
 
== Building cross compiler ==
  
Check out the latest trunk sources of FPC using the following command:
+
You need to have working FPC 2.6.x compiler in order to create the cross-compiler. This tutorial describes how to build the cross-compiler on Windows, but it can be used for any system with small obvious modifications.
  
svn co fpcdev http://svn.freepascal.org/svn/fpc/trunk
+
Assume the following paths:
 +
* Android NDK path: '''<tt>C:\Program Files\Android SDK\android-ndk-r8d</tt>'''
 +
* FPC svn sources path: '''<tt>C:\Develop\FPC\FPC</tt>'''
 +
* The cross-compiler installation path: '''<tt>C:\Develop\FPC\pp</tt>'''

Revision as of 17:46, 13 February 2013

Android

Currently support for android target is present in the trunk (development) version 2.7.1 of FPC.

Supported CPUs:

  • ARM
  • i386

Android NDK

You need to download and install Android NDK in order to compile programs for the android target. Download Android NDK using this link: http://developer.android.com/tools/sdk/ndk/index.html

Extract it to some folder.

FPC sources

Check out the latest trunk sources of FPC using the following command:

svn co FPC http://svn.freepascal.org/svn/fpc/trunk

Now you have the compiler sources in the FPC sub-folder.

Building cross compiler

You need to have working FPC 2.6.x compiler in order to create the cross-compiler. This tutorial describes how to build the cross-compiler on Windows, but it can be used for any system with small obvious modifications.

Assume the following paths:

  • Android NDK path: C:\Program Files\Android SDK\android-ndk-r8d
  • FPC svn sources path: C:\Develop\FPC\FPC
  • The cross-compiler installation path: C:\Develop\FPC\pp