Android ndk on Code::Blocks

Started by
3 comments, last by twgage 12 years, 8 months ago
How i can configure the Android ndk for using the tools on an free development ide like the Code::blocks?
Advertisement
Eclipse is free and has C++ plugins.

I don't know about CodeBlocks, just google.

The ndk is officaly supported only in eclipse as far as I know, but there are some user made tools for Visual Studio but they're still in development so some people can't get them to work properly (WinGDB and vs-android).
just clickin

you need cygwin for ndk anyway on windows, and if your on linux/mac then my advice will be the same: learn the command line tool and you can use any IDE you want. the command line isn't nearly as crazy as it sounds, you just call ndk-build from the top level project directory and off it goes building your native code. I wrote a basic script that automates the whole progress of calling ndk-build, using ant to build the final apk package, and then deploy to the attached device for iterating.

from there your IDE just becomes a useful text editor, you wont use it for compiling but we all usually use our IDE of choice because of the featureset for writing our code.


Thanks i will follow your advice, i told because i find very confusing which executables i should add to the ide, because in the sdk there is the toolchain directory, in which there are x86 and arm-linux-androideabi, i dont know if that is refered to which platform is executed the compiler, or which is the target platform. Also inside of each one there are two bin directories
when you download the ndk, youll have a folder called 'doc' or similar with documentation files. Read those for detailed information on the buildsystem and toolchain. They are also available on the android developer site but can be a bit hard to find.

Generally speaking to set up the build environment you'll download cygwin (make sure to get all the dev packages like gcc and make) and the android-ndk. from there youll need to set up your user PATH variable to point to the android-ndk directory. from there go to the samples directory in the ndk and try to run the hello-world sample by going into the directory and typing 'ndk-build' from the cygwin prompt.

you will still need apache ant to build the apk file to deploy to your device as well

This topic is closed to new replies.

Advertisement