繁体   English   中英

为Xcode 4.3.2和SDK 5.1编译pjsip 2时出错

[英]Error while compiling pjsip 2 for Xcode 4.3.2 and SDK 5.1

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

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

当遵循本指南时: http : //trac.pjsip.org/repos/wiki/使用入门/ 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正确编译?

请认为我是新手,谢谢!

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

在./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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM