Cross-compiling third-party libraries for Android platform versions using NDK

Source: Internet
Author: User

As long as the Ndk-bundle directory structure is understood, the basic principle of cross-compiling can be compiled by self-scripting.
After taking the code package from the warehouse, it is common to compile the library used by the current platform under the Linux platform, as long as the configuration of the platform-related configuration is made using its automatic configuration script configure, it can execute make to compile and install after the success.
Configure typically check the platform-supported interfaces under/usr/inclue and/usr/lib, and compile with a collection of two tools for binutils and GCC.
Therefore, to use the NDK for cross-compiling, the most basic is to configure the above 4 features, you can configure the most basic cross-platform environment, it is logical to do the subsequent configuration compilation work. Simply put, this is the case, in fact, the configuration and compilation after the beginning of the difficult.
Ndk-bundle in the cross-compilation of the main application of the two directories are platforms and Toolchains, see the following directory structure map can be clear of their respective role.

Https://github.com/bbqz007/xw/ndk-build-libevent.zip is an example of configuring a cross-compiling Libevent library under the Android platform.

Cross-compiling third-party libraries for Android platform versions using NDK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.