Mac OS下Linphone SDK的编译环境搭建

来源:互联网 发布:程序员的数学三部曲 编辑:程序博客网 时间:2024/06/05 02:26

文章依据linphone-iphone源码中的readme,以及在实际的操作记录的笔记整理。

1、安装Xcode和Command Line
建议在AppStore中安装Xcode,或者去苹果开发者网站下载Xcode独立的安装包

(https://developer.apple.com/xcode/index.php),注意自己的Mac OS系统版本。

安装完毕Xcode后,在Xcode-Preference-Downloads中找到Command Line Tools,

如果没有安装点击后面的“install”按钮。


2、安装MacPorts
https://distfiles.macports.org/MacPorts/
1.1、注意自己Mac OS的系统版本,使用的MacPorts要适用宿主Mac OS的系统版本
1.2、下载安装完毕之后,检查环境变量:

:$PATH

查看是否符合要求,readme中标注:“Make sure that /opt/local/bin (macport tools) 

arrives first in your PATH env variable”没有被自动添加的话,手动编辑环境变量:

:vim ~/.profile

在最前面添加“/opt/local/bin:/opt/local/sbin:”


3、安装Required build-time tools:

:sudo port install coreutils automake autoconf libtool intltool 

wget pkgconfig cmake gmake yasm grep doxygen ImageMagick optipng



4、安装gas-preprosessor.pl(http://github.com/yuvi/gas-preprocessor/ ) 并复制到

目录 /opt/local/bin (执行下列操作即可):

:wget --no-check-certificate https://raw.github.com/yuvi/gas-preprocessor/master/gas-preprocessor.pl
:sudo mv gas-preprocessor.pl  /opt/local/bin/
:sudo chmod +x /opt/local/bin/gas-preprocessor.pl


5、Link macport libtoolize to glibtoolize
:sudo ln -s /opt/local/bin/glibtoolize /opt/local/bin/libtoolize


6、Link host's strings to simulator SDK
 6.1、Xcode版本小于等于4.3的话
: sudo ln -s  /usr/bin/strings /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings
  6.2、Xcode版本大于4.3
:sudo ln -s  /usr/bin/strings /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings


7、编译Linphone SDK
:cd submodules/build
:make all
原创粉丝点击