Windows下编译linphone
本博文介绍了再MSYS&MINGW环境中编译linphone(貌似当前版本是3.5.2),可参照解压后README.mingw文件的说明进行编译,下面把主要注意事项进行说明
1 下载最新版mingw
从官网http://www.mingw.org/下载最新版mingw-get-inst.exe,例如本人从官网(http://sourceforge.net/projects/mingw/files/MinGW/)下载到的是mingw-get-inst-20120426.exe,如图:
以默认路径安装:C:\MinGW,安装时正如README.mingw说描述,3个安装选项必须选择:
Download lastest mingw-get-inst.exe from http://www.mingw.org
Run mingw-get-inst.exe. Choose "download lastest catalogues".
In the feature list, select:
* C compiler
* C++ compiler
* Mingw developer toolkit
Let the installer fetch and install everything.
在mingw shell命令行执行如下安装和操作:
mingw-get install msys-zip
mingw-get install msys-unzip
mingw-get install msys-wget
mkdir -p /opt/perl/bin
cp /bin/perl /opt/perl/bin/.
2 下载并安装必要工具
在mingw命令行返回主目录:
cd ~
下载intltool(在mingw命令行):
wget http://ftp.acc.umu.se/pub/GNOME/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip
下载linphone-deps(利用浏览器):
http://download.savannah.gnu.org/releases-noredirect/linphone/misc
下载最新版gtk+ win32 bundle from http://www.gtk.org
cd /
unzip ~/ intltool_0.40.4-1_win32.zip
unzip <path to gtk bundle zip>
unzip <path to linphone-deps>
解压后mingw会自动把压缩包中的文件释放到C:\MinGW\msys\1.0相关目录下
#Install GTK+ Outcrop theme, the one used by linphone for distribution.
cd /share/themes
wget http://art.gnome.org/download/themes/gtk2/1122/GTK2-Outcrop.tar.gz
tar -xvzf GTK2-Outcrop.tar.gz
#To get the translations working, remove from C:/MinGW/lib :
libintl.a libintl.la libintl.dll.a
(貌似和intltool相关库冲突,需删除以上三个库文件,否则console.exe编译不过)
3 下载并编译最新版的linphone
It is recommended that you create a directory somewhere with a path without any spaces or ~ characters, for example
c:\sources\
Within msys-git bash, do
cd /c/sources
git clone git://git.linphone.org/linphone.git --recursive
之后进行编译,不过以下内容没有搞清楚,
#Compile and install tunnel
cd tunnel && ./autogen.sh && ./configure --prefix=/opt/linphone && make && make install
我是按照下面内容进行编译的
./autogen.sh
./configure --prefix=/opt/linphone --enable-shared --disable-static
make
#will install to /opt/linphone, required for compilation of plugins.
make install
#make a binary zip of linphone
make zip
#additionally you can make binary installer if you have Inno Setup 5 installed in its default path
make setup.exe
#now you're done, you have a fresh linphone windows installer in the current directory.
我编译成功后在windows下C:\MinGW\msys\1.0\opt\linphone\bin运行linphone.exe时,发现仍会提示少默写库文件,剩下的拷贝工具可能是需要自己做,我就没有再进一步完善了!
以上是在mingw环境下的编译,在VC环境下直接进行编译比较困难,网上http://code.google.com/p/linphone-vs2008/有一个整理好的3.4.x版本的能直接再VC2008下进行编译,新的3.5.x貌似还需要大牛进行整理!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】