Trying to generate sdl2 libs for android


#1

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.


#2

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