陈江川

邮箱:jiangchuanc@gmail.com

idoubs编译笔记

下载doubango、idoubs源码

mkdir mydoubs
cd mydoubs
git clone https://github.com/DoubangoTelecom/doubango.git doubango
git clone https://github.com/DoubangoTelecom/idoubs.git idoubs

构建demo应用

创建一个demoIdoubs的App

常规默认创建,重点在保存路径,记得和ios-ngn-stack目录平行,即同一个父目录。

将ios-ngn-stack添加为项目引用

关闭XCode打开的其他项目,只保留当前的demo项目。 将ios-ngn-stack.xcodeproj从finder中拖放到demo项目内。

添加链接库

在demo项目的Build Phases中,在Link Binary With Libraries里添加各种需要的内容。

libios_ngn_stack.a
libtinyBFCP.a
libtinySAK.a
libtinyNET.a
libtinySDP.a
libtinyRTP.a
libtinyIPSec.a
libtinyMSRP.a
libtinyHTTP.a
libtinyMEDIA.a
libtinySIGCOMP.a
libtinySMS.a
libtinyXCAP.a
libtinySIP.a
libtinyDAV.a
libtinyWRAP.a
QuartzCore.framework
OpenGLES.framework
Security.framework
CFNetwork.framework
AudioToolbox.framework
AddressBook.framework
CoreGraphics.framework
AVFoundation.framework
CoreMedia.framework
CoreVideo.framework
SystemConfiguration.framework
AddressBook.framework
libsqlite3.tbd
libresolv.tbd


配置Build Settings

User-Defined

DOUBANGO_HOME       ../../doubango
DOUBANGO_LIBS       $DOUBANGO_HOME/thirdparties/iphone/lib/universal
NGN_STACK_HOME      $DOUBANGO_HOME/thirdparties/iphone/lib/universal
PREBINDING          NO

Linking/Other Linker Flags

-lsrtp -lssl -lcrypto -lyuv -lvpx -lx264 -lopenh264 -lswscale -lavutil -lavcodec -lopus -lgsm -lg729b -lspeex -lspeexdsp -framework Foundation -framework UIKit

Search Paths/Header Search Paths

$NGN_STACK_HOME/common-ngn-stack $NGN_STACK_HOME/ios-ngn-stack $DOUBANGO_HOME/bindings/_common $DOUBANGO_HOME/tinySDP/include $DOUBANGO_HOME/tinySMS/include $DOUBANGO_HOME/tinyHTTP/include $DOUBANGO_HOME/tinySIP/include $DOUBANGO/HOME/tinyMSRP/include $DOUBANGO_HOME/tinyMEDIA/include $DOUBANGO_HOME/tinyNET/src $DOUBANGO_HOME/tinySAK/src $DOUBANGO_HOME/tinyDAV/include $DOUBANGO_HOME/thirdparties/common/include ../common-ngn-stack ../ios-ngn-stack

Search Paths/Library Search Paths

$(inherited) $DOUBANGO_LIBS

Apple LLVM 7.1 - Custom Compiler Flags / Other C Flags

-DNS_BLOCK_ASSERTIONS=1

Build Settings / Apple LLVM 7.1 - Language 下的Compile Sources As为Objective-C++

加入头文件

在ViewController.h中,加入头文件

#import "iOSNgnStack.h"

« git-flow常用命令 Runtime - 消息转发 »