Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML for Android  (Read 4795 times)

0 Members and 1 Guest are viewing this topic.

sitev_ru

  • Newbie
  • *
  • Posts: 3
    • View Profile
SFML for Android
« on: February 02, 2018, 09:46:58 am »
I install SFML for Android (https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android), but I get a mistake. Please help me.

C:\work\SFML\build\armeabi>cmake -DANDROID_ABI=armeabi -DCMAKE_TOOLCHAIN_FILE=..
/../cmake/toolchains/android.toolchain.cmake ../..
CMake Error at cmake/toolchains/android.toolchain.cmake:802 (message):
Specified Android native API level 'android-9' is not supported by your
NDK/toolchain.
Call Stack (most recent call first):
build/armeabi/CMakeFiles/3.9.2/CMakeSystem.cmake:6 (include)
CMakeLists.txt:62 (project)


CMake Deprecation Warning at C:/Program Files/CMake/share/cmake-3.9/Modules/CMak
eForceCompiler.cmake:69 (message):
The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set
CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/android.toolchain.cmake:1153 (CMAKE_FORCE_C_COMPILER)
build/armeabi/CMakeFiles/3.9.2/CMakeSystem.cmake:6 (include)
CMakeLists.txt:62 (project)


CMake Deprecation Warning at C:/Program Files/CMake/share/cmake-3.9/Modules/CMak
eForceCompiler.cmake:83 (message):
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/android.toolchain.cmake:1165 (CMAKE_FORCE_CXX_COMPILER)
build/armeabi/CMakeFiles/3.9.2/CMakeSystem.cmake:6 (include)
CMakeLists.txt:62 (project)


CMake Error at CMakeLists.txt:62 (project):
CMAKE_SYSTEM_NAME is 'Android' but 'NVIDIA Nsight Tegra Visual Studio
Edition' is not installed.


-- Configuring incomplete, errors occurred!
See also "C:/work/SFML/build/armeabi/CMakeFiles/CMakeOutput.log".

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10835
    • View Profile
    • development blog
    • Email
Re: SFML for Android
« Reply #1 on: February 02, 2018, 10:49:54 am »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Optimistic

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: SFML for Android
« Reply #2 on: February 12, 2018, 02:22:16 am »
Hey there, I got past the step that requires 'Nsight Tegra VS Edition', by following the steps here: https://blogs.msdn.microsoft.com/vcblog/2015/12/15/support-for-android-cmake-projects-in-visual-studio/ and then setting my cmake path to the bin folder!

Optimistic

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: SFML for Android
« Reply #3 on: February 12, 2018, 03:12:26 am »
I installed make for windows from here

Then I set my path and tried to run
Code: [Select]
make
but now I get:
Code: [Select]
makefile:37: *** missing separator.  Stop. which corresponds to this piece of code:
Code: [Select]
32 #=============================================================================
33 # Set environment variables for the build.
34
35 !IF "$(OS)" == "Windows_NT"
36 NULL=
37 !ELSE
38 NULL=nul
39 !ENDIF
40 SHELL = cmd.exe

I have looked around and it seems to be a problem with white space and tabs, but I'm unsure.




I then used
Code: [Select]
nmake -f Makefile  and
Code: [Select]
nmake install but now I'm unsure about how to use this... :-\  :(  :'(
« Last Edit: February 12, 2018, 03:41:32 am by Optimistic »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 878
    • View Profile
Re: SFML for Android
« Reply #4 on: February 13, 2018, 11:13:41 am »
Grab the latest SFML sources from the repository ("master" branch).

Go to your build directory and invoke CMake:

Code: [Select]
cmake -G "Generator of your choice" -DCMAKE_SYSTEM_NAME=Android CMAKE_ANDROID_NDK=/path/to/your/ndk -DCMAKE_ANDROID_STL_TYPE=c++_static -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_SYSTEM_VERSION=14 /path/to/your/sfml/source
Then build and install. Keep in mind this is still experimental and mostly untested.

8Observer8

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • My website
    • Email
Re: SFML for Android
« Reply #5 on: February 08, 2024, 01:37:43 pm »
I have made a step-by-step instruction for Android: How to build SFML3 with gradlew for Android on Window 10 with MinGW