0
votes

I try to build a PJSip project on iPhone simulator. My work environment is Xcode 5.1.1, the ios SDK is 7.1. As I followed this guide:http://trac.pjsip.org/repos/wiki/Getting-Started/iPhone, I downloaded the latest code and configured the build system for the iPhone simulator:

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

It's all done, no errors occurred in the compiling process. But when I opened the ipjsua.xcodeproj using Xcode in pjproject/pjsip-apps/src/pjsua/ios, after running, the error occurred and said like this:

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

I am very confused about this. Any advice from you will be appreciated.

1
This link may help: trac.pjsip.org/repos/ticket/1728Ashutosh
I follow this link and built the lib manually,so it worked! thank you so much !samuelmk2

1 Answers

1
votes

I used the steps below to solve the problem:

  1. I tried to run the build for i386 architecture using these commands:

    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. Set the correct header paths in Xcode for the Target's Search Paths:

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