Android Add prebuilt lib (*.so) to Android.mk

Source: Internet
Author: User

Recently ported FFmpeg to Android do transcoding tool, compiled out of the libffmpeg.so, call the library encountered a little problem, refer to the following article to solve:

***************************

If your code doesn't want to be released with Android, or your code uses a closed-source third-party library file, you can dynamically link the libraries you need to your program, Modify the Android.mk file to allow Android to put the specified. So file into the system directory for Dlopen use while packaging the binaries.

The following is a generic sample file that explains how to modify Android.mk. Increase

My_local_path: = $ (Local_path)

The reason is

Local_path: = $ (call My-dir)

Can only occur once in a. mk file.

Sample files at compile time, the libabc.so should be placed in the same directory as the. Mk.

Local_path: = $ (call My-dir)

My_local_path: = $ (Local_path)

Include $ (clear_vars)

Local_prebuilt_libs: = libabc.so

Include $ (build_multi_prebuilt)

Local_path: = $ (My_local_path)

Include $ (clear_vars)

Local_src_files: = main.cpp

Local_module: = MyTest

Local_shared_libraries: = Libabc

Include $ (build_executable)

Thank RKTB, refer to the original address Http://www.mail-archive.com/[email protected]/msg00990.html

***************************

This article is from the "focus on embedded multimedia Technology" blog, please be sure to keep this source http://zyg0227.blog.51cto.com/1043164/1421522

Related Article

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.