Unable to Build latest SDL from hg in android

Hi all,

I just followed the same steps provided in README-android.txt , while using ndk-build i got the below error!.

/SDL/src/main/android/SDL_android_main.c:30: error: undefined reference to ‘SDL_main’

But if i build with 2.0.1 , it compiles properly. Kindly suggest.

Make sure that you don’t use an environment that you configured for some
other system before. (make dist-clean)Am 07.02.2014 08:28, schrieb keestu:

Hi all,

I just followed the same steps provided in README-android.txt , while
using ndk-build i got the below error!.

/SDL/src/main/android/SDL_android_main.c:30: error: undefined
reference to ‘SDL_main’

But if i build with 2.0.1 , it compiles properly. Kindly suggest.

http://www.caveproductions.org
http://www.ufoai.org

Martin, I tried with new terminal, and just exporting only ndk-build, still the same error?. between do we need to define SDL_main () by our own?. not sure if it is detecteing libsdl2.so properly?

Never mind; it works if i include sdl.h , not sure how it is related to linking process ?

SDL.h redefines main to SDL_main(), since on Android we provide our own
main() function that calls yours.

–ryan.On 2/7/14, 3:09 AM, keestu wrote:

Never mind; it works if i include sdl.h , not sure how it is related to
linking process ?