doubango編譯總結

============================================================

Doubango工程地址

官方編譯步驟文檔

============================================================


參考上面的官方文檔基本就可以進行編譯了


====================================================

說下我的編譯環境

操作系統centos7

我是按照推薦編譯來編譯的Doubango工程


============================================================

編譯出錯的問題

1.error: dereferencing pointer to incomplete type
src/tls/tnet_dtls.c:119:47:error: dereferencing pointer to incomplete type
     if(_tnet_dtls_is_fingerprint_matching(ctx->cert, &socket->remote.fp,socket->remote.hash) == tsk_false) {
openssl版本問題導致的
採用openssl-1.0.1c版本進行手動編譯便可解決

2.INT_MAX錯誤
缺少<limits.h>頭文件所致
找到報錯的代碼。把該頭文件#include包含進去


3.error: parameter 3 ('encoder') has incompletetype
查看對應的頭文件,發現CodecID應該替換成AVCodecID
#include <libavcodec/avcodec.h>
 
staticinttdav_codec_h263_init(tdav_codec_h263_t* self, tdav_codec_h263_type_t type,enumAVCodecIDencoder,enumAVCodecIDdecoder)
把對應報錯的文件中所有的CodecID都替換成AVCodecID(這是FFMpeg庫代碼中聲明的)

4.NDK環境變量配置

我的環境變量配置
 export NDK=/home/webrtc/ndk
 export PATH=$NDK:$PATH
 
doubango的NDK檢測腳本,這裏可以看到NDK的命名必須爲NDK
if [ x$NDK="x"]
then
       echo ERROR: NDK env variable is not set
       exit1;
fi
 

編譯成功後的結果

===================================================

....

Libraries have been installed in:
   /home/webrtc/doubango/android-projects/output/gpl/x86/lib

...


查看該目錄就能看到對應的.so庫會生成


發佈了38 篇原創文章 · 獲贊 11 · 訪問量 6萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章