The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL Android issues on Win7 64
Lazy Foo'


Joined: 21 Sep 2009
Posts: 17
So I've been trying to get the Android SDK to cooperate but have been having no luck. I have been fiddling around and got some things to build but no matter how I tinker with things I can't get main to load and execute. I am starting from scratch, stepping through this, and hoping someone can help me find the issue.

I have:
-Downloaded the zip file source
-Imported the SDL project in eclipse and copied it to the workspace
-Copied the contents of SDL2-2.0.3 to the jni directory. Android.mk got overwritten in the process.

When I run ndk-build in the JNI directory, I get this:

Code:

[armeabi] Compile thumb  : SDL2 <= SDL.c
[armeabi] Compile thumb  : SDL2 <= SDL_assert.c
[armeabi] Compile thumb  : SDL2 <= SDL_error.c
[armeabi] Compile thumb  : SDL2 <= SDL_hints.c
[armeabi] Compile thumb  : SDL2 <= SDL_log.c
[armeabi] Compile thumb  : SDL2 <= SDL_audio.c
[armeabi] Compile thumb  : SDL2 <= SDL_audiocvt.c
[armeabi] Compile thumb  : SDL2 <= SDL_audiodev.c
[armeabi] Compile thumb  : SDL2 <= SDL_audiotypecvt.c
[armeabi] Compile thumb  : SDL2 <= SDL_mixer.c
[armeabi] Compile thumb  : SDL2 <= SDL_wave.c
[armeabi] Compile thumb  : SDL2 <= SDL_androidaudio.c
In file included from /jni/src/audio/android/SDL_androidaudio.c:31:0:
/jni/src/audio/android/../../core/android/SDL_android.h:30:29: fatal error: EGL/eglplatform.h: No such file or directory
compilation terminated.


What is the proper way to fix this?
theGiallo


Joined: 03 Nov 2014
Posts: 11
Location: Genova, IT
I read that you had troubles on your site and searched for this post Smile

I had problems with Android too, but I managed to overcome them. I read these pages
http://jorhlok.net/2013/07/31/from-nix-to-android-with-sdl2-and-sdl_image-using-the-command-line-of-course/
http://www.dinomage.com/2013/01/howto-sdl-on-android/

I had a problem with the SDL_android_main.cpp https://forums.libsdl.org/viewtopic.php?t=10811

And I used the hg 2.0.4 zip version of SDL. I worked on linux command line ad in those tutorials.


I what I linked wont help try to post more infos on the problem(s).
Naith


Joined: 03 Jul 2014
Posts: 158
I think you should check this thread: https://forums.libsdl.org/viewtopic.php?t=10777

I had a lot of problem getting SDL for android work so I requested this guide. After reading and follow it, I got it to work. Let's hope it can do the same for you. Smile