Trying to generate sdl2 libs for android

I have managed to setup cygwin on windows 10 I want to compile libsdl2.so using the build-script “androidbuildlibs.sh” but I always get this message but it still compiles. Am I doing something wrong or can this be ignored ?

[arm64-v8a] Compile : SDL2 <= SDL_render_gles2.c
In file included from ./src/render/opengles2/SDL_render_gles2.c:304:
./src/render/opengles2/SDL_gles2funcs.h:58:1: warning: incompatible pointer types assigning to ‘void (*)(GLuint, GLsizei, const GLchar **, const GLint )’ (aka 'void ()(unsigned int, int, const char **, const int *)’) from ‘void (GLuint, GLsizei, const GLchar *const *, const GLint *)’ (aka ‘void (unsigned int, int, const char *const *, const int *)’) [-Wincompatible-pointer-types]
SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar **, const GLint *))
^ ~~~~~~~~~~~~~~
./src/render/opengles2/SDL_render_gles2.c:293:45: note: expanded from macro ‘SDL_PROC’
#define SDL_PROC(ret,func,params) data->func=func;
^~~~~
1 warning generated.

Hello,

I am not a programmer, but if you ignore those warnings even if your library build and it is usable at some point will generate issues.
You can disable all warnings adding -w parameter to gcc

However, i saw those kind of warning while trying to compile old source code with new versions of gcc, maybe you can try an older version, and use a virtual machine instead of cygwin which can have it’s own bugs. Or install a native linux on you machine on a different HDD/partition.

Good luck,

Maarc

I’m having the same problem on Windows 10 in Android Studio.

I’m using Android SDK 21. NDK 20.
Anyone found a solution?

I figured this out. Because I was using mingw, and tar commands are easily accessible, it works well for compiling c code even on windows. I downloaded the Source code for sdl2 from the tar ball. When it does need to be downloaded from the zip file! The actual grade/android app is set up and configured differently depending on the source. I dont know why it is like it is, but it is.