Error compling SDL 2.05


Hello, I’m trying complie 64 bit bin’s for Andriod, had to change the SDL_image to 2.0.5 and use another NDK
but I’m getting this error.

Anyone came across it?

jni/SDL_image/IMG_pnm.c: In function ‘ReadNumber’:
jni/SDL_image/IMG_pnm.c:94:24: error: ‘SDL_MAX_SINT32’ undeclared (first use in this function)
if (number >= (SDL_MAX_SINT32 / 10)) {
jni/SDL_image/IMG_pnm.c:94:24: note: each undeclared identifier is reported only once for each function it appears in
make.exe: *** [obj/local/armeabi-v7a/objs/SDL2_image/IMG_pnm.o] Error 1
“C:/adt-bundle-windows-x86_64-20140702/android-ndk-r10e/ndk-build.cmd” terminated with exit code 2. Build might be incomplete.

10:03:22 Build Failed. 2 errors, 1 warnings. (took 23s.713ms)


Try disabling PNM support. SDL supports obscure crap, like PNM, but fails to support PNG, JPG and GIF out of the box, so you have to compile libpng separately. And I mind you, in SDL2 they totally abandoned all compatibility with SDL1, yet retained that, also adding a fsckload of other useless nonsense, like that RLE. SDL is turning into Allegro.


PNG seems be in 2.05 IMG_PNG.c …You still need PNG lib?


I’m sure about one thing: I don’t need PNM, and it shouldn’t be compiling for Android, which doesn’t use XWindow (the only case where PNM/PBM could be a dependency).