I’m trying to setup the android version of SDL 2.0 in Ubuntu linux with the r9 NDK.
I followed the instructions in README-android.txt and tutorials in the wiki exactly.
Copy the android-project from the SDL source into my project directory.
Then copy the SDL source into the project directories jni directory.
Added my source file (at this point a cpp file with an empty main function). to /jni/src/Android.mk.
First problem when running ndk-build was:
“android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found”
This was solvable by renaming the linux-x86_64 folder in the NDK to linux-x86.
Which version of ubuntu? Ubuntu is (or at least was) using the dash, not
the bash - maybe that is the problem. You can also give my small
android-sdl2-example project a try [1]. It was done with a ubuntu system.
I’m trying to setup the android version of SDL 2.0 in Ubuntu linux with the r9 NDK.
I followed the instructions in README-android.txt and tutorials in the wiki exactly.
Copy the android-project from the SDL source into my project directory.
Then copy the SDL source into the project directories jni directory.
Added my source file (at this point a cpp file with an empty main function). to /jni/src/Android.mk.
First problem when running ndk-build was:
“android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found”
This was solvable by renaming the linux-x86_64 folder in the NDK to linux-x86.
This was solvable by renaming the linux-x86_64 folder in the NDK to linux-x86.
definitely don’t do this. you didn’t say, but the usual way to run ndk-build is using the environment variable $NDK like this:
Code:
$NDK/ndk-build
if this gives you an error then your environment variable is set up incorrectly. this may indicate other problems with the way the ndk was installed / set up.
i’m not an expert on the ndk but if you renamed the folder containing 64bit code so it has the name for the folder that should contain 32bit code, it could cause problems. also if your $NDK environment variable is pointing to the 32bit code that could cause other problems.
i got an android project to compile on ubuntu and posted detailed steps here on the forum not long ago.