Bienvenue, Invité. Merci de vous connecter ou de vous inscrire.
Avez-vous perdu votre e-mail d'activation ?

Auteur Sujet: Build pour Android sur windows  (Lu 3162 fois)

0 Membres et 1 Invité sur ce sujet

illift

  • Newbie
  • *
  • Messages: 2
    • Voir le profil
Build pour Android sur windows
« le: Avril 26, 2018, 06:48:33 pm »
Bonjour,
Je viens vous demander de l'aide car cela fait 2 jours que j'essaye tant bien que mal de compiler sfml mais pour android.

J'ai donc suivi le tuto ici: https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android-on-Windows

j'ai donc (enfin je pense) bien configurer mes variables d'environnement, et arrivé au cmake, cela me sort une erreur comme quoi je serait sur windows et pas sur android =/

Voici la commande (comme sur le tuto):
Citer
cmake -G "MinGW Makefiles" -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake ../..

et voici la sortie:
Citer
c:\projects\SFML\build\armeabi-v7a>cmake -G "MinGW Makefiles" -DANDROID_A
abi-v7a -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.c
/..
CMake Error at cmake/toolchains/android.toolchain.cmake:802 (message):
  Specified Android native API level 'android-8' is not supported by your
  NDK/toolchain.
Call Stack (most recent call first):
  C:/CMake/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:91 (includ
  CMakeLists.txt:48 (project)


CMake Deprecation Warning at C:/CMake/share/cmake-3.11/Modules/CMakeForce
r.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:1146 (CMAKE_FORCE_C_COMPILER)
  C:/CMake/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:91 (includ
  CMakeLists.txt:48 (project)


CMake Deprecation Warning at C:/CMake/share/cmake-3.11/Modules/CMakeForce
r.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:1158 (CMAKE_FORCE_CXX_COMPILER
  C:/CMake/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:91 (includ
  CMakeLists.txt:48 (project)


CMake Error at cmake/Macros.cmake:291 (message):
  Missing item in FREETYPE_LIBRARY
Call Stack (most recent call first):
  src/SFML/Graphics/CMakeLists.txt:137 (sfml_find_package)


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

Voici le CMakeOutput.log:
Citer
The target system is: Android - 1 - armv7-a
The host system is: Windows - 6.1.7601 - AMD64

Voici ma variable d'environnement PATH:
Citer
c:\projects\SFML\build\armeabi-v7a>PATH
PATH=C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windo
ws\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x
86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Skype\Phone\;C:\Progr
am Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Ser
ver\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\CMake\bin;C:\NVPACK\android-sdk-
windows\extras\android\support;C:\NVPACK\android-sdk-windows\build-tools;C:\NVPA
CK\android-sdk-windows\platform-tools;C:\NVPACK\android-sdk-windows\tools;C:\NVP
ACK\gradle-4.1\bin;C:\NVPACK\apache-ant-1.8.2\bin;C:\NVPACK\jdk1.8\bin;C:\NVPACK
\android-ndk-r15c;C:\Program Files\Actionaz;C:\projects\cmake\bin;C:\projects\sd
k\tools;C:\projects\sdk\platform-tools;C:\projects\ndk;C:\projects\apache-ant\bi
n;C:\mingw\bin;


Voila j'ai deja pas mal chercher mais je ne trouve personne qui a la même erreur que moi, j'ai essayer de recommencer le wiki, refaire chaque étape, mais rien n'y fait.

Si quelqu'un a une idée pour m'aider =)

Merci d'avance.


EDIT:

J'ai continue mes recherches, j'ai donc ajouter a ma commande -DANDROID_NATIVE_API_LEVEL=android-21:
Citer
c:\projects\SFML\build\armeabi-v7a>cmake -G "MinGW Makefiles" -DANDROID_ABI=arme
abi-v7a -DANDROID_NATIVE_API_LEVEL=android-21 -DCMAKE_TOOLCHAIN_FILE=../../cmake
/toolchains/android.toolchain.cmake ../..

ce qui change le résultat de la sortie:
Citer
c:\projects\SFML\build\armeabi-v7a>cmake -G "MinGW Makefiles" -DANDROID_ABI=arme
abi-v7a -DANDROID_NATIVE_API_LEVEL=android-21 -DCMAKE_TOOLCHAIN_FILE=../../cmake
/toolchains/android.toolchain.cmake ../..
CMake Deprecation Warning at C:/projects/cmake/share/cmake-3.11/Modules/CMakeFor
ceCompiler.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:1146 (CMAKE_FORCE_C_COMPILER)
  C:/projects/cmake/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:91 (incl
ude)
  CMakeLists.txt:48 (project)


CMake Deprecation Warning at C:/projects/cmake/share/cmake-3.11/Modules/CMakeFor
ceCompiler.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:1158 (CMAKE_FORCE_CXX_COMPILER)
  C:/projects/cmake/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:91 (incl
ude)
  CMakeLists.txt:48 (project)


CMake Error at cmake/Macros.cmake:291 (message):
  Missing item in FREETYPE_LIBRARY
Call Stack (most recent call first):
  src/SFML/Graphics/CMakeLists.txt:137 (sfml_find_package)


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

Après quelques recherche j'ai essayer de modifier le toolchain comme ceci (apparament a cause de cmake qui prend pas le bon compilateur ou alors je comprend rien):
https://github.com/bingmann/android-cmake/commit/e0ec7de86d454894b3837a62b8676635b6d318f6

Ce qui me donne en sortie:

Citer
c:\projects\SFML\build\armeabi-v7a>cmake -G "MinGW Makefiles" -DANDROID_ABI=arme
abi-v7a -DANDROID_NATIVE_API_LEVEL=android-21 -DCMAKE_TOOLCHAIN_FILE=../../cmake
/toolchains/android.toolchain.cmake ../..
-- The C compiler identification is GNU 4.9.0
-- The CXX compiler identification is GNU 4.9.0
-- Check for working C compiler: C:/projects/ndk/toolchains/arm-linux-androideab
i-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc.exe
-- Check for working C compiler: C:/projects/ndk/toolchains/arm-linux-androideab
i-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/projects/ndk/toolchains/arm-linux-androide
abi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++.exe
-- Check for working CXX compiler: C:/projects/ndk/toolchains/arm-linux-androide
abi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at cmake/Macros.cmake:291 (message):
  Missing item in FREETYPE_LIBRARY
Call Stack (most recent call first):
  src/SFML/Graphics/CMakeLists.txt:137 (sfml_find_package)


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

et voici le CMakeOutput.log:
https://pastebin.com/bS3WQjJ3


J'ai l'impression d'avoir un peu avancé, mais je reste bloqué =/
« Modifié: Avril 26, 2018, 09:11:58 pm par illift »