Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » ALLEGRO on Android for Android

This thread is locked; no one can reply to it. rss feed Print
ALLEGRO on Android for Android
CRAZY CONDITIONS
Member #16,385
June 2016
avatar

Hello forum.

Is it possible to write ALLEGRO programs for Android on Android in C?
Are all commands supported, are there differences between for example the Windows version of ALLEGRO and an Android version?

I would code with C4Droid (or CPPDroid better?) Or is only GCC supported by ALLEGRO?
Which C compiler on Android can be used with the library and produces APKs itself?

And where to get an ALLEGRO build of the core library and the addon libraries and header files?

The same question for the FMOD audio library...

SiegeLord
Member #7,827
October 2006
avatar

A large amount of functionality is supported, enough for most games.

Not sure about using it on the Android itself, we're making a somewhat heavy use of CMake so you'd have to get around that somehow. In principle Allegro also supports Clang and MSVC, so we don't use too many GCC extensions.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

CRAZY CONDITIONS
Member #16,385
June 2016
avatar

Thanks for reply.

I'm just at the beginning coding for Android. On Windows I was able to build the core library, the freetype library and the addon libraries of ALLEGRO using MinGW and CMake (Windows version of ALLEGRO).

What is the library format on Android for shared and static libraries? How are they named? Are there differences between Android and Linux or can I use Linux shared and static libraries with Android?

Exist builds somewhere in the net to download? I need the header files and the libraries to use with C4Droid or CPPDroid (Android C compilers).

Are there alternative C APIs?
Or is it only possible to use the standard C API on Android?

CC

SiegeLord
Member #7,827
October 2006
avatar

There are instructions you can follow to build Allegro for Android in README_android.txt. The format is the same, but the architecture is different. Typically you'll get the toolchain (compiler/linker) if you download the Android NDK from Android's website.

Overall, the way Allegro works on Android is that it's actually a Java app that loads the C bits from a shared library via JNI. In principle, if you follow README_android.txt you'll get the shared libraries built which you might be able to use in C4Droid.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Rodolfo Lam
Member #16,045
August 2015

I think that what the OP wants is to use Allegro inside a C (or C++) compiler that works inside Android... Like in compiling things from inside the phone/tablet/whatever.

From what I see on that apps store page... It is just intended to be used for basic programs. Trying to build Allegro inside that is a little bit overkill. Another user here is developing JAlleg, a Java binding for Allegro, if that is what you want to use to develop. but it need to be developed on a real PC. (Or maybe a Linux environment inside the phone, but still why?)

SDL and SDL2 have support built-in on the app. That route should probably be easier for you to start with.

CRAZY CONDITIONS
Member #16,385
June 2016
avatar

It is true that I want to do programming just on Android itself.

I hoped that there would be the header files and the core and add-on libraries of ALLEGRO built for Android and using these with an Android C compiler like you would do on Windows+MinGW would suffice to write ALLEGRO programs all on the Android platform.

But some people said an Android C compiler will need some more stuff especially for using the ALLEGRO library on Android.

Also I don't know much about shared and static libraries on other platforms than Windows. I know that shared libraries are called lib*.so and static ones lib*.a. On Linux they seem to be named identically, but can you use them perfectly with both platforms?
Are import libraries needed to use shared ones on Android?

C. C.

Go to: