我尝试在 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)
我对此感到非常困惑。您的任何建议将不胜感激。
最佳答案
我使用以下步骤解决了该问题:
我尝试使用以下命令运行 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
在 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/