[fpc-devel] Fwd: [MacPascal] Developing for Android with Pascal and Eclipse

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Nov 6 11:17:18 CET 2012


Some people here may also be interested in this. I've already added a link on the wiki at http://wiki.freepascal.org/FPC_JVM_Android_Development


From: Phil Hess <macpgmr at fastermac.net>
Date: 5 Nov 2012 03:08:21 GMT+01:00
Date: 5 Nov 2012 03:08:24 GMT+01:00

For a change of pace I looked into integrating FPC's JVM compiler with the Eclipse IDE. Turns out it's not too difficult - I just created a simple console app that you add as a "builder" to the build sequence of your Eclipse Android projects.

Here are some notes I've written for getting everything set up:

http://web.fastermac.net/~MacPgmr/pba/PbaStatus.html

Everything works fine on a Mac, meaning you can target both iOS and Android with Pascal, although sharing source code between iOS and Android apps is minimal at this point.

Android challenges include learning the ins and out of Android "activities" and resources, as well as familiarizing yourself with the vast Android runtime. Fortunately, FPC includes the androidr14 unit all ready to go without any additional parsing on our part. And of course you'll be shocked at how slow the Android emulator is - it makes Xcode's Simulator look like something from the future.

This is really pretty nifty: developing for a Java RTL using Pascal syntax. Very much analogous to what we do with Pascal vis-a-vis Objective-C.

Let me know if I've left anything out or if you spot any obvious mistakes in what I've written up.

Thanks.

-Phil



More information about the fpc-devel mailing list