PJSIP构建问题

时间:2014-05-26 09:29:28

标签: ios xcode build compilation pjsip

环境:OS X 10.9.3,Xcode 5.1,PJSIP-2.2.1 我想构建简单的PJSIP,shell脚本如下:

#!/bin/bash

SOURCE="pjproject-2.2.1"
CONFIG="pjlib/include/pj/config_site.h"

if [ ! -r $SOURCE ]; then
    echo 'PJSIP source not found. Trying to untar...'
    tar -xjf $SOURCE.tar.bz2
fi

cd $SOURCE

touch $CONFIG
echo > $CONFIG
echo "#define PJ_CONFIG_IPHONE 1" >> $CONFIG
echo "#include <pj/config_site_sample.h>" >> $CONFIG

./configure-iphone
#make dep && make clean && make

echo Done.

运行正常并创建.a文件,例如pjlib/lib/libpj-arm-apple-darwin9。但是当我将它们用于我的iOS项目时,它失败了Endianness must be declared for this processorPJ_IS_LITTLE_ENDIAN is not defined!PJ_IS_BIG_ENDIAN is not defined!等等。我认为PJSIP没有正确构建。有谁知道? 我查了Compile PJSIP for iOS7

1 个答案:

答案 0 :(得分:4)

我将此添加到项目的预处理器宏中,然后运行正常:PJ_AUTOCONF=1