ios - 无法运行有关 PJSip 的 iPhone 模拟器

标签 ios xcode pjsip

我尝试在 iPhone 模拟器上构建 PJSip 项目。我的工作环境是Xcode 5.1.1,ios SDK是7.1。当我遵循本指南时:http://trac.pjsip.org/repos/wiki/Getting-Started/iPhone , 我下载了最新的代码并配置了 iPhone 模拟器的构建系统:

export DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
ARCH="-arch i386" CFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" LDFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" ./configure-iphone
make dep && make clean && make

一切都完成了,编译过程中没有出现任何错误。但是当我在pjproject/pjsip-apps/src/pjsua/ios中使用Xcode打开ipjsua.xcodeproj时,运行后出现错误,如下所示:

ld: library not found for -lmilenage-arm-apple-darwin9
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我对此感到非常困惑。您的任何建议将不胜感激。

最佳答案

我使用以下步骤解决了该问题:

  1. 我尝试使用以下命令运行 i386 架构的构建:

    export DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
    ARCH="-arch i386" CFLAGS="-O2 -m32 -mios-simulator-version-min=5.0"
    DFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" ./configure-iphone
    make dep && make clean && make
    
  2. 在 Xcode 中为目标的搜索路径设置正确的 header 路径:

    "$(SRCROOT)/../../../../pjlib/include"
    "$(SRCROOT)/../../../../pjlib-util/include"
    "$(SRCROOT)/../../../../pjmedia/include"
    "$(SRCROOT)/../../../../pjnath/include"
    "$(SRCROOT)/../../../../pjsip/include"
    

关于ios - 无法运行有关 PJSip 的 iPhone 模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23534389/

相关文章:

swift - 是否可以手动传输 pod 文件而不是运行 `pod install` ?

ios - 应用程序适用于模拟器,但不适用于设备。奇怪的错误信息? X代码

asterisk - 如何在 pjsip 和 Asterisk 13 中允许入站调用?

python - 在 OS X 10.9 上编译 PJSUA

ios - 如何在 swift 3.0 中将图像写入路径

ios - 使用 dispatch_async() 避免 View 阻塞的解决方法是什么

ios - 调用 setter 给出无法识别的选择器错误

ios - UIViewController 没有在 Storyboard 中保持状态

ios - 如何在 UIDatePicker 中更改日期格式

ios - pjusa 与 iOS 出现错误 (PJSIP_ENOCREDENTIAL) [状态 = 171101]