reference:

http://developer.android.com/sdk/ndk/overview.html

Development tools

The NDK includes a set of cross-toolchains (compilers, linkers, etc..) that can generate native ARM binaries on Linux, OS X, and Windows (with Cygwin) platforms.

It provides a set of system headers for stable native APIs that are guaranteed to be supported in all later releases of the platform:

  • libc (C library) headers
  • libm (math library) headers
  • JNI interface headers
  • libz (Zlib compression) headers
  • liblog (Android logging) header
  • OpenGL ES 1.1 and OpenGL ES 2.0 (3D graphics libraries) headers
  • libjnigraphics (Pixel buffer access) header (for Android 2.2 and above).
  • A Minimal set of headers for C++ support
  • OpenSL ES native audio libraries
  • Android native application APIS

Download:

 NDK download here

Installing the NDK

windows here  Android NDK r5 windows系统上安装与使用
mac

Develop on eclipse:

 http://download.eclipse.org/releases/galileo

if installed successful, you could create c++ on new project

write a first NDK

1. new a android project.

2. in this project, select  “new\otehr\convert to a C/C++ project”

3 select your project  and select convert to c or c++ “c++ project”

4. create 3 folders, “native”,”libs”,”obj”

5. update path and symbols, select “Properties\c/c++ General\ Paths and symbols”,
add your xxx/native to tere, and remove xxx, like below image

good reference: http://marakana.com/forums/android/examples/49.html

 

 

 

 

 

 

 

By admin-powenko

Dr. Powen Ko is a teacher and CEO on LoopTek LLC, and like to teaching. if you need to class, please let PowenKo know, he will love to service and sharing. LoopTek web site is www.looptek.com

Leave a Reply