[gambit-list] Gambit for mobile?

Marc Feeley feeley at iro.umontreal.ca
Tue Feb 12 13:04:30 EST 2013


On 2013-02-11, at 4:52 PM, Andrew Pennebaker <andrew.pennebaker at gmail.com> wrote:

> What's the state of Gambit support for mobile app development?
> 
> Can we have tutorials for writing Android, iOS, and Windows Phone apps in Gambit?
> 

I don't know of any tutorial, but there are several existing project you could examine.  For example, you could check how the "Gambit REPL" iOS app is implemented (in the contrib/ directory).

There are also the scripts "misc/build-gambit-iOS" and "misc/build-gambit-android" which automate the process of building the Gambit runtime libraries on iOS and android (those scripts even download the latest sources automatically).  Also, the file "misc/simple-make-project.tgz" is a useful starting point if you like make for automating the build process (but not specifically for iOS or android).

But the gist of it is actually quite simple.  Take all of the .c and .h files from the lib/ and include/ directories and compile them with the -D___LIBRARY and -D___PRIMAL flags.  Then, compile you app.c and app_.c (generated using "gsc -link app.scm") and link all of the .o files together.  The file "misc/vc2008.bat" is a shell script showing the steps (when using Microsoft Visual C++, but for other C compilers the process is simular).  On iOS, android, etc you'll need to write some FFI interface to call out to the mobile device's libraries.

Marc




More information about the Gambit-list mailing list