SDL Android issues on Win7 64

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?------------------------
SDL 2.0 Tutorial (http://lazyfoo.net/tutorials/SDL/index.php) now under construction!

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. :slight_smile:

This is an absurdly late reply to this post from last year, but I wanted to
throw down some info about this error because I came across it when
bungling around with converting an Eclipse w/ADT project over to Android
Studio.

ndk-build chooses the right include directories to use based on the Android
API level your project targets. If you are getting an error saying that an
Android system header is missing (such as eglplatform.h), then it may be
that the build is not picking up the API level setting. Make sure that
APP_PLATFORM is set somewhere (if no where else, try in Application.mk),
e.g.:
APP_PLATFORM := android-10

Jonny DOn Tue, Nov 4, 2014 at 3:15 AM, Lazy Foo’ wrote:

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?


SDL 2.0 Tutorial http://lazyfoo.net/tutorials/SDL/index.php now under
construction!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org