Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Allegro 4.4 build for Android failing

This thread is locked; no one can reply to it. rss feed Print
Allegro 4.4 build for Android failing
eri0o_
Member #16,808
February 2018

Hey,

Can someone shine a light on the errors I am having here:

http://www.adventuregamestudio.co.uk/forums/index.php?topic=44768.msg636580835#new

Basically, build is failing (using ndk and latest cmake) as described bellow:

-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
CMake Error at CMakeLists.txt:962 (get_target_property):
get_target_property() called with non-existent target "allegrogl".


CMake Error at CMakeLists.txt:962 (get_target_property):
get_target_property() called with non-existent target "loadpng".


CMake Error at CMakeLists.txt:962 (get_target_property):
get_target_property() called with non-existent target "logg".


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
RT_LIBRARY
linked by target "allegro" in directory /home/erico/git/ags/Android/buildlibs/armeabi-v7a/allegro-4.4.2

-- Configuring incomplete, errors occurred!
See also "/home/erico/git/ags/Android/buildlibs/armeabi-v7a/allegro-4.4.2/CMakeFiles/CMakeOutput.log".
See also "/home/erico/git/ags/Android/buildlibs/armeabi-v7a/allegro-4.4.2/CMakeFiles/CMakeError.log".

Edgar Reynaldo
Member #8,592
May 2007
avatar

Hello eri0o_,

I've never tried to build Android libraries for A4.4 before, so I don't know how much help I'll be, but I'll try.

You can safely ignore the PNG not found, if you don't need it, otherwise you'll have to set the two variables (PNG_LIBRARY and PNG_INCLUDE_DIR) yourself, according to where they are located.

The next 3 errors all come from the addons. I'm not sure why they are there.

The last error has to do with not being able to find the RT_LIBRARY variable value. I'm not sure why that's there either. If you know what it is supposed to be, you can set that variable manually on your command line.

Elias is our resident expert on Android. Hopefully he knows what is going on.

Just a warning though, Allegro 4 is deprecated in favor of Allegro 5. So you might not get much help. If you can find out what's wrong and how to fix it, please submit a patch to the Allegro Development mailing list, or fork Allegro and fix it and make a pull request.

Elias
Member #358
May 2000

The main problem I expect on Android is that Allegro 4 has no "driver" for Android. So you will have to implement things like displaying the screen and collecting touch input.

If that's things you don't need it (but I can't imagine many use cases where you would not) then you will probably be able to compile with some minor fixes to the code and/or build system.

If you have an existing Allegro 4 game and want it to work on Android the easiest route might be changing it to use Allegro 5 (which has builtin support for an Android display and Android touch input).

Or do some hybrid where you keep using A4 and add some code to copy over the Allegro 4 screen into an Android view and pass touch events to the Allegro 4 mouse functions - the best way really depends on the game, and whether you plan to do a one-time porting or keep developing it...

--
"Either help out or stop whining" - Evert

Go to: