First, Eclipse Association Cygwin
1. Right click on select properties-> Select Builders, select New in builders to create a program
2. Parameter configuration
Ii. Eclipse Associated Ndk-build (self-built builder method)
1. Project->properties->builders->new, create a new builder
2. Parameter configuration
2.1 Main
①name:ndk_builder
②location is the path to Ndk-build.cmd, can be an absolute path, or it can be in the form of an environment variable, that is, ${android_ndk}\ndk-build.cmd, where ANDROID_NDK is a configured NDK path
③working Directory, for the current project.
Here the expression of ${} is using the EC environment variable, can use the variables ... button to find some 3 EC environment variables.
For the configuration on Linux, just like the configuration here, simply change the address of location to Ndk-build.
2.2 Refresh
2.3 Build Options
Note: Only modify Ndk-build.cmd to Ndk-build in Linux environment
Iii. Eclipse Associated Ndk-build (using the CDT method)
1. Pre-Preparation: Eclipse environment +android Environment +eclipse C + + Environment
2. Write Android Java/jni code, refer to OpenCV instance 1
3. Convert an Android project to a C + + project (which has C + + properties), e.g., convert to a C + + C + +, New.
4. Configure the NDK compilation path, Project->properties, where Build-command android_ndk is the ANDROID-NDK path configured in the environment variable; build-directory is the current project directory
5. Configure the engineering properties, Project->properties, for example, OpenCV for example, where CNU C and GNU C + + are configured with a OPENCV link library
6. Configure Ndk_module_path, such as
Three ways eclipse automatically compiles ndk/jni