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

Author Topic: [SOLVED] ERROR: building and compiling SFML for Android  (Read 11914 times)

0 Members and 1 Guest are viewing this topic.

RunRanger

  • Newbie
  • *
  • Posts: 9
    • View Profile
[SOLVED] ERROR: building and compiling SFML for Android
« on: August 11, 2014, 01:35:41 am »
Hey  :D

I tried to set up SFML for Android by following many guides like the Thread in this forum or the guide on Git  but every way i found i get errors :(
I searched 3 days for a solution but i didn't find any so i hope i get help.
Forum Guide: http://en.sfml-dev.org/forums/index.php?topic=13716.0
Git Guide:https://github.com/SFML/SFML/wiki/Building-SFML-for-Android




But every time i build it i get errors :/

Error by using MinGW MakeFiles on cmd:
Command I used:
Quote
cmake -G "MinGW Makefiles" -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=9 -DANDROID_USE_STLPORT=TRUE -DCMAKE_TOOLCHAIN_FILE=B:\Bearbeitung\ProgrammierungAppAndroid\libs\SFML\cmake\toolchains\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=B:\Bearbeitung\ProgrammierungAppAndroid\libs\android-ndk-r9\prebuilt\windows-x86_64\bin\make.exe
(click to show/hide)

Error by using Visual C++ 2010 with CMake-Gui:
(click to show/hide)
(click to show/hide)
Translated: The programm "B:\Bearbeitung\...\Debug\ALL_BUILD"  could not be started. failed to find the target device

Compiler-Error Visual C++ by using CMD for building SFML:
Command I used:
Quote
cmake -DANDROID_ABI=armeabi -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake ../..
(click to show/hide)




System:
Windows 7 64bit
Programms:
CMake 2.8.12.2
Android NDK 9r
newest Android SDK[/font]

If there's any information missing, i will add it.

I hope my English isn't so bad :S I beg your pardon.
« Last Edit: August 30, 2014, 02:40:12 am by RunRanger »

Dreamflask

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #1 on: August 12, 2014, 01:07:50 am »
Hey RunRanger

I have the same problem.
I used this links:

https://github.com/SFML/SFML/wiki/Building-SFML-for-Android
and
http://en.sfml-dev.org/forums/index.php?topic=13716.0

CMD Command i used:
(click to show/hide)

System:
Windows 8.1 - 64Bit
Programms:
CMake 3.0.0
Android NDK r10
Android SDK Tools rev 22.6.4
Android SDK Plattform-Tools rev 19.0.2
Visual Studio 2013 Ultimate

Errors from VS 2013 Ultimate
(click to show/hide)

Dont know why he show's me this /Wno-psabi as invalid not numeric Argument, 7 times.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #2 on: August 12, 2014, 10:22:57 pm »
When working with CMake, always use forward slashes rather than backslashes in path names.

Also try using a command line tool (nmake or make), the Visual Studio IDE will screw up the compiler settings for whatever reason.

RunRanger

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #3 on: August 14, 2014, 01:46:09 pm »
Thanks for the replies :)

I've seen you have edited the Building-Guide  :D

I followed it 3-times again and considerd your reply, but everytime the cmd gave me the same error :/
Input CMD:
Quote
cmake -G "MinGW Makefiles" -DANDROID_ABI=armeabi -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake ../..
(click to show/hide)

Translated:
The syntax of the filename directory or volume is incorrect.
The following error occurs: \C:\Program.
The syntax of the filename directory or volume is incorrect.
The following error occurs: 2.8\bin\cmake.exe\ -HC:\Users\User\SFML -BC:\Users\User\SFML\build\armeabi --check-build-system CMakeFiles\Makefile.cmake 0.
make: *** [cmake_check_build_system] Error 1



Output by invoking CMake:
(click to show/hide)
« Last Edit: August 14, 2014, 01:48:56 pm by RunRanger »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #4 on: August 15, 2014, 01:01:45 pm »
You've got something under "C:\Program Files (x86)" or "C:\Program Files" that isn't properly called by make (i.e. spaces in the path but no quotes around it).

Where did you install/unpack the Android NDK?

RunRanger

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #5 on: August 15, 2014, 01:10:47 pm »
I unpacked it under:
C:\android-ndk-r9


I reinstall all programms (CMake), which i need, in a path without spaces.
New Paths:
CMake : C:\CMake
NDK    : C:\android-ndk-r9
MinGW: C:\MinGW

SDK     : C:\Program Files (x86)\Android\android-sdk
Git       : C:\Program Files (x86)\Git





[EDIT:]

Now i get a new ERROR:


(click to show/hide)

translated:
Quote
the system cannot find the file specified.
the following error occurred: C:\CMake\bin\cmake.exe -E cmake_depends \MinGW.
The path of Makefiles\ C:\Users\User\SFML C:\Users\User\SFML\src\SFML\System C:
\Users\User\SFML\build\armeabi C:\Users\User\SFML\build\armeabi\src\SFML\System
C:\Users\User\SFML\build\armeabi\src\SFML\System\CMakeFiles\sfml-system.dir\Depe
ndInfo.cmake --color= is too long.
The following Error occured: Makefiles\ C:\Users\User\SFML C:\Users\User\SFML\src\
SFML\System C:\Users\User\SFML\build\armeabi C:\Users\User\SFML\build\armeabi\sr
c\SFML\System C:\Users\User\SFML\build\armeabi\src\SFML\System\CMakeFiles\sfml-s
ystem.dir\DependInfo.cmake --color=.
make[2]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/depend] Error 1
make[1]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/all] Error 2
make: *** [all] Error 2
« Last Edit: August 16, 2014, 11:46:23 am by RunRanger »

RunRanger

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #6 on: August 17, 2014, 02:10:53 am »
I got it compiled :D

I changed the MinGW to the MinGW of Code::Blocks and used "mingw32-make install" to compile.

But i get it only compiled with the CMake-GUI and there's also one problem.
The compiled SFML is installed in C:\Program Files (x86)\SFML instead of my Android-NDK Sources file :/

(click to show/hide)
[EDIT]:
It seems, the settings of the CMakeLists.txt didn't load :/ How can i fix this for the gui?




If I use the Shell Command, an error occurs:
(click to show/hide)

« Last Edit: August 17, 2014, 02:16:42 am by RunRanger »

CytraL

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • GitHub
Re: ERROR: building and compiling SFML for Android
« Reply #7 on: August 17, 2014, 02:49:06 am »
I use:

Code: [Select]
cd C:\Programacion\C++\Android\SFML
SET ANDROID_NDK=C:\Programacion\C++\Android\android-ndk-r9d
cmake.exe -G"MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=C:\Programacion\C++\Android\SFML\cmake\toolchains\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM="%ANDROID_NDK%\prebuilt\windows-x86_64\bin\make.exe"
"%ANDROID_NDK%\prebuilt\windows-x86_64\bin\make.exe"
"%ANDROID_NDK%\prebuilt\windows-x86_64\bin\make.exe" install
« Last Edit: August 17, 2014, 02:51:39 am by CytraL »
dev@redneboa.es | WordPress | GitHub | YouTube

RunRanger

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #8 on: August 17, 2014, 01:47:45 pm »
I get the same error, as before :/




(click to show/hide)

CytraL

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • GitHub
Re: ERROR: building and compiling SFML for Android
« Reply #9 on: August 17, 2014, 03:45:29 pm »
Perhaps need reinstall MinGW... i personally use IDE Code::Blocks that install MinGW...
dev@redneboa.es | WordPress | GitHub | YouTube

RunRanger

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #10 on: August 17, 2014, 03:55:16 pm »
i have both installed.  And tested it both.

But i swtich between them after every compiling-try, by changing the path in the enviroment variable PATH.
=> So i don't use both at the same time.


[EDIT]:
Is it possible, that the standart C++ libary isn't included? NMake and Mingw-make always throught out the same Error. => they can't find ostream
If I'm right, how can I fix this?
« Last Edit: August 20, 2014, 01:47:31 am by RunRanger »

RunRanger

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #11 on: August 20, 2014, 04:45:10 am »
I tried many thinks out, but everytime the same Error occured :(
By the help of Veltas i can give out the complete message by using "SET VERBOSE=1":
(click to show/hide)

Error as text:
(click to show/hide)



Things i have changed without succes:
- changed CMake Version (2.8.9,    2.8.12,   3.0.1)
- using CMake-Gui and Command Prompt
- using MinGW solo and CodeBlocks MinGW-files
- deleting #include <ostream> => a new #include gives an error
- editing #include <ostream> into #include <iostream>  => the same error but at this time it can't find iostream
- restartet everytime from scratch



CMake-Gui:
(click to show/hide)
« Last Edit: August 20, 2014, 04:56:31 am by RunRanger »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #12 on: August 20, 2014, 10:11:15 pm »
What's the file system you're using on C:? Unlikely, but might explain the path name issues. Besides that, are you sure your NDK dir is fine and there isn't anything moved by accident or anything similar?

RunRanger

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #13 on: August 20, 2014, 10:58:41 pm »
file system C: NTFS

I only changed sometimes the NDK (switch between 32 and 64 bit)


[EDIT:] I've reinstalled all programms but nothing changed :/ (also NDK and SDK)
« Last Edit: August 21, 2014, 12:25:03 am by RunRanger »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: ERROR: building and compiling SFML for Android
« Reply #14 on: August 21, 2014, 09:18:24 am »
This is really weird. It should find standard headers anytime. Still complaining about ostream? If so, out of ideas right now.