我尝试在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)
我对此非常困惑。任何建议都将不胜感激。
答案 0 :(得分: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
在Xcode中为目标的搜索路径设置正确的标题路径:
"$(SRCROOT)/../../../../pjlib/include"
"$(SRCROOT)/../../../../pjlib-util/include"
"$(SRCROOT)/../../../../pjmedia/include"
"$(SRCROOT)/../../../../pjnath/include"
"$(SRCROOT)/../../../../pjsip/include"