【问题标题】:Error while compiling pjsip 2 for Xcode 4.3.2 and SDK 5.1为 Xcode 4.3.2 和 SDK 5.1 编译 pjsip 2 时出错
【发布时间】:2012-04-24 13:15:45
【问题描述】:

我正在尝试使用终端编译 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 编译不出错?

请认为我是新手,谢谢!

【问题讨论】:

  • 你能分享一下我遇到同样问题的答案吗? pjsip 完全相同的错误

标签: iphone macos ios5 xcode4.3 pjsip


【解决方案1】:

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

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

【讨论】:

  • 我在发布后一周左右开始工作。谢谢你的帖子!我会将您的帖子标记为已接受,以表示感谢!
  • 你是如何让它工作的,与全班分享,因为我喝这口酒过得很不愉快
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-04-16
  • 1970-01-01
  • 2014-04-14
  • 1970-01-01
  • 2014-04-15
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多