Cygwin
Introduced
Cygwin is the Linux environment emulator under WINDWOS.
Why do I need Cygwin?
because the NDK can only run in a Linux environment.
installation process
1. Open the Cygwin executable file and execute the extension library installation address.
I choose install from local Directory, because the extension library I have downloaded to local.
2. Select the installation directory, the directory name can not have spaces or Chinese
3. because a local installation is selected, you need to specify a plug-in package
4. Select the plugin to install, Devel (compile), shells (Execute script)
5. after the installation is complete, click on the desktop icon to open the Cygwin
Cygwin initialization interface appears for the first time
After installation will see a cygdrive directory, which is the user's hard disk directory, Ls–l can see the user all the hard drive letter.
Make–v View version information (check if the installation was successful)
Cygdrive is the hard disk of the current computer, opening this directory will display the current computer's drive letter
Linux executes the bin file under the current directory,./file name, such as:./ndk-build
Configuring NDK Environment variables
In the Cygwin installation directory, there is a etc directory where the environment variable is configured in the profile file in the directory.
Note: Under Linux, ":" is used as the delimiter.
Configure the NDK path in Cygwin (note: The path of the NDK cannot contain Chinese or white space)
Add the path to the NDK in the path system variable of the profile file:
Ndk
Introduced
The NDK is a cross-compilation tool.
What is cross-compiling?
In simple terms, under one platform, compile a program that can run under another platform.
Ndk
Android NDKr10:
Http://dl.google.com/android/ndk/android-ndk32-r10-windows-x86.zip
Http://dl.google.com/android/ndk/android-ndk32-r10-windows-x86_64.zip
http://dl.google.com/android/ndk/android-ndk32-r10-darwin-x86.tar.bz2
http://dl.google.com/android/ndk/android-ndk32-r10-darwin-x86_64.tar.bz2
http://dl.google.com/android/ndk/android-ndk32-r10-linux-x86.tar.bz2
http://dl.google.com/android/ndk/android-ndk32-r10-linux-x86_64.tar.bz2
Http://dl.google.com/android/ndk/android-ndk64-r10-windows-x86.zip
Http://dl.google.com/android/ndk/android-ndk64-r10-windows-x86_64.zip
http://dl.google.com/android/ndk/android-ndk64-r10-darwin-x86.tar.bz2
http://dl.google.com/android/ndk/android-ndk64-r10-darwin-x86_64.tar.bz2
http://dl.google.com/android/ndk/android-ndk64-r10-linux-x86.tar.bz2
http://dl.google.com/android/ndk/android-ndk64-r10-linux-x86_64.tar.bz2
Http://dl.google.com/android/ndk/android-ndk-r10-cxx-stl-libs-with-debug-info.zip
Android NDKR9:
Http://dl.google.com/android/ndk/android-ndk-r9d-windows-x86.zip
Http://dl.google.com/android/ndk/android-ndk-r9d-windows-x86_64.zip
http://dl.google.com/android/ndk/android-ndk-r9d-darwin-x86.tar.bz2
http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86.tar.bz2
http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86_64.tar.bz2
Http://dl.google.com/android/ndk/android-ndk-r9d-cxx-stl-libs-with-debug-info.zip
installation process
Unzip the downloaded compressed package into a directory without Chinese and white space, and then complete the installation
Open the NDK directory under Cygwin, execute the./ndk-build command, and the following hints indicate that the NDK can run
Related commands:
Clear cache: Ndk-build Clean
Generate a dynamic library: Ndk-build
Directory structure
Build-cross-compiled toolchain, with lots of script files under Linux and Windows
docs-Documentation
samples-Sample Code
platforms-the header files under each platform, and introduce the corresponding header files according to the specified platform.
prebuilt-Pre-compiled libraries
sources-source File
tests-Test
toolchains-Tool Set
Built under Windows NDK development environment