0

我正在尝试使用终端编译 pjsip 第 2 版,无论我尝试什么,我都会遇到不断的错误。一直在互联网上寻找答案,包括stackoverflow。

我今天使用他们的 subversion 存储库下载了 pjsip 版本 2,因此所有文件都应该是最新的。

遵循本指南时:http ://trac.pjsip.org/repos/wiki/Getting-Started/iPhone运行“make dep && make clean && make”后出现此错误:

ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
make[2]: *** [../bin/pjsua-arm-apple-darwin9] Error 1
make[1]: *** [pjsua] Error 2
make: *** [all] Error 1

将上述指南与本指南结合使用时:http ://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2011-October/013481.html运行“make dep && make clean && make”后出现此错误:

ld: symbol(s) not found for architecture arm
collect2: ld returned 1 exit status
make[2]: *** [../bin/pjsua-arm-apple-darwin10] Error 1
make[1]: *** [pjsua] Error 2
make: *** [all] Error 1

我已将 /pjlib/include/pj/config_site.h 包含在以下代码中:

#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>

如何让 pjsip 编译没有错误?

请考虑我是新手,谢谢!

4

1 回答 1

3

从您的错误来看,似乎可能有几件事是错误的。我会确保在继续之前清除所有环境变量(为了安全起见)。

在 ./configure-iphone 中,确保更改:

./aconfigure --host=arm-apple-darwin9 --disable-floating-point $*

到:

./aconfigure --host=arm-apple-darwin10 --disable-floating-point $*

以下是我用来构建库的脚本:

模拟器:

    export DEVPATH=/Developer/Platforms/iPhoneSimulator.platform/Developer
    export CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc

    export CFLAGS="-O2 -m32 -miphoneos-version-min=5.0 -g -ggdb -g3 -DNDEBUG" 
    export LDFLAGS="-O2 -m32"

    ./configure-iphone

    make clean
    make dep
    make
    make clean

设备:

  export ARCH="-arch armv7"
  export CFLAGS="-DNDEBUG -g -ggdb -g3"

  ./configure-iphone

  make clean
  make dep
  make
  make clean
于 2012-05-18T02:23:40.463 回答