At this time, go to the libs directory of hello-jni to see if there are any. $NDK is to call the environment variables that we have configured before, and ndk-build is to call the compiler of ndk. Īfter step 4 is executed successfully, it will automatically generate a libs directory and put the compiled. The preceding symbol " $ " is required to be entered, not a prompt symbol of Cygwin ! ! ! It represents the environment variables previously set in Cygwin. ![]() Step 3 enter the following command to compile: Step 2 Start and run Cygwin, enter the following command, and enter the C:/android-ndk-r8e/samples/hello-jni directory:Ĭd/cygdrive/c /android-ndk-r8e/ samples/hello-jni The specific path depends on where you store your NDK. Step 1: We choose the example hello-jni that comes with NDK, mine is located at C:/android-ndk-r8e/samples/hello-jni Test it first and compile a simple program with the installed NDK : If all version information and some description information are printed out, it means that cygwin is installed okĮnter cd $ NDKROOT, if the output of /cygdrive/c/android-ndk-r8e information configured above, it indicates that the environment variable is set successfully.Ĩ. Then enter gcc -version, g++ -version, make -version, gdb -version to test. ![]() If the status is ok, cygwin is running normally. The cygcheck -c cygwin command will print out the current version and running status of cygwin. After configuration, you can use cygwin now, run the cygwin.bat file, and enter the corresponding command to test You can modify it to your own directory.ħ. I put android-ndk-r8e in the root directory of the C drive. What does NDKROOT=/cygdrive/c/android-ndk-r8e mean, because it is a simulating linux environment, the android ndk path is specified here. If you want to change the path, you need to modify the cygwin.bat file Unzip the downloaded cygwin package and put cygwin in the root directory of the c drive. In view of the internet speed, I put my download in Baidu network disk, ĥ. Download and install eclipse integrated with adt, available on Google's official website, or ģ. Download and install jdk, available on the oracle official website, or, configure the environment variable pathĢ. In order to save time, some places refer to other articles. In order to facilitate myself and prevent others from being tortured by the speed of the cygwin download, I still record it. ![]() I didn't want to write such an article, because there are many articles on the Internet about setting up the environment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |