Linphone-Android environment Compilation

Source: Internet
Author: User
Tags automake linphone

1. Download linphone-android source code

Http://www.linphone.org/eng/download/git.html
The git address for linphone-android is:
Run the following command on the VM:
Git clone git: // git.linphone.org/linphone-android.git -- recursive
Remember to attach rescursive. Otherwise, it will be around MB after download.
 
 
Ii. Configure the relevant compiling environment
 
After downloading the SDK, check the readme file.
 
1) download the Android ndk (> = r5c) from google.
I am personally the latest version of the android-ndk-r7c. (how to install NDK can be found in this folder)
 
2) install the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig
These took me one morning.
 
In fact, you can use apt-get install.
 
Sudo apt-get install autools-dev can automatically help you install autoconf, automake, and aclocal. then install libtoolize. Do not take sudo apt-get install libtoolize for granted.
 
The correct command is: sudo apt-get install libtool
 
Pkg-config system.
 
Check whether the related commands have been installed successfully:
Which autoconf (the which command is used to find what PATH points to and find its PATH). The command PATH is displayed successfully.
 
(3) copy the platform-tools and tools folders under the sdk directory to the root directory of the linphone-android source code;
 
(4) import the ndk PATH to the environment variable, for example, export PATH = $ PATH :~ /Linphones/android-ndk-r8d
 
3. Compile linphone-android

(1) After the above steps are completed, start to execute./prepare_sources.sh. (here I encountered a problem)
 
Problem:
 
1: indicates that the ndk path is incorrect.
 
Add your ndk path to/etc/environment.
 
PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /home/hnzzh/huzi/linphone-android/package/android-ndk-r8"
 
Then restart source/etc/enviroment. If you run the following command: which ndk-build can see the path where nkd-build is located, it means no problem.
 
2: When./prepare_sources.sh is run, an error is prompted about the ndk permission. Therefore, you need to change all the ndk including subdirectories to the 777 permission.
 
After compilation, the following message is displayed:
 
Patching file Makefile
Hunk #1 succeeded at 47 with fuzz 2 (offset 21 lines ).
 
 
(2) run the following ndk-build command:
 
After the installation is complete, the following message is displayed:
 
Compile thumb: linphonenoneon <= ec-calibrator.c
SharedLibrary: liblinphonearmv5.so
Install: liblinphonearmv5.so => jni/.. // libs/armeabi/liblinphonearmv5.so
 
At this time, it will take about three minutes to compile successfully, and then there will be various so files compiled in the libs directory.
Armeabi/liblinphone. so
Armeabi-v7a/libavcodec. so, libavcore. so, libavutil. so, liblincrypto. so, liblinphone. so, liblinssl. so, libsrtp. so, libswscale. so!
 
At this point, the entire linphone installation is complete, and the next step is to use Eclipse to import!
 
Iv. Eclipse Import
 
(1) eclipse import android Project
 
Import the linphone_android directory in eclipse!
 
Assume that all @ Override needs to be removed from Ubuntu eclipse.

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.