SFML community forums
General => General discussions => Topic started by: Kipero on January 09, 2020, 10:17:50 pm
-
Hi guys,
I have a problem with including one more lib for this example app, made on this tutorial below: https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android
My goal is to create an android game. I have this one finished on Windows/MS Visual Studio (SFML and Box2D) and now i need port it to android. I don't know how to do it. Thank you in advance for your help.
-
Based on the SFML example used in the wiki post you have to make the following adjustments:
- Adding your source files here (https://github.com/SFML/SFML/blob/master/examples/android/app/src/main/jni/Android.mk#L7)
- Compiling Box2D for android and installing it into the third party lib of your NDK installation. I have not done it, but Box2D provide a cmake script which should make this easier. You can try the same cmake command as for building sfml from the wiki post you have posted.
Another possibilty can be found here (https://krzysiekfonal.wordpress.com/2013/02/23/box2d-porting-to-android-ndk/), this may be outdated since it is from 2013. - Link Box2D like sfml is linked here (https://github.com/SFML/SFML/blob/master/examples/android/app/src/main/jni/Android.mk#L9). This is not needed for the tutorial I linked in the previous step.
Best,
Alex
-
Thank you very much! Your response is truly helpful.