歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu下編譯安裝WebRTC

Ubuntu下編譯安裝WebRTC

日期:2017/2/28 14:52:01   编辑:Linux教程

Ubuntu下編譯安裝WebRTC

svn checkout http://webrtc.googlecode.com/svn/trunk/

下載完成後, WebRTC下會得到一個默認名為trunk的文件夾,裡頭就是WebRTC源碼了,只是源碼而已,並沒有編譯的相應工程文件。

然後 gclient config https://webrtc.googlecode.com/svn/trunk (生成.gconfig文件)

gclient sync --force (同步項目文件,要下載1個多G的文件,網速不好的,可以去玩一盤dota回來)

gclient runhooks --force (生產Linux的MakeFile文件)

下來Make開始編譯,編譯的過程中碰到很多依賴庫沒有安裝,下面做了記錄

安裝了下面的三個庫:

apt-get install libasound2-dev
apt-get install libpulse-dev
apt-get install libx11-dev

root@zhangsj-mac:/home/webrtc_svn/trunk# make
CXX(target) out/Debug/obj.target/video_render_module/webrtc/modules/video_render/linux/video_x11_channel.o
In file included from webrtc/modules/video_render/linux/video_x11_channel.cc:11:0:
webrtc/modules/video_render/linux/video_x11_channel.h:20:33: 致命錯誤: X11/extensions/XShm.h:沒有那個文件或目錄編譯中斷。
make: *** [out/Debug/obj.target/video_render_module/webrtc/modules/video_render/linux/video_x11_channel.o] 錯誤 1

在安裝一個庫
root@zhangsj-mac:/home/webrtc_svn/trunk# apt-get install libxext-dev

最後在Make, 成功。

2014年7月更新: Ubuntu 14.04編譯WebRTC For Android代碼 http://www.linuxidc.com/Linux/2014-10/108084.htm

更多Ubuntu相關信息見Ubuntu 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=2

Copyright © Linux教程網 All Rights Reserved