First put on PJSIP official website http://www.pjsip.org/download.htm
When downloading note while the. bz2 have LF line-ends and are for Unix and Mac OS X systems. (please download. bz2)
Start compiling when the download is complete:
First you have to have a Xcode.
1, find your source code, that is, you downloaded the one. tar.bz2 mac should have its own decompression tool I just double-click to open it.
And then build a config_site.h. h file in the pjlib/include/pj/directory
#define Pj_config_iphone 1<pj/config_site_sample.h>
The home directory can be retrieved after completion
Prepare to finish start compiling four platforms i386 (simulator)
Execute at Terminal
$ 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 && do clean && make
There is no error after execution, the emulator version of the static library is compiled: directory
- Pjlib/lib
- Pjlib-util/lib
- Pjmedia/lib
- Pjnath/lib
- Pjsip/lib
- Third_party/lib
Several other static library compilation basically no difference of course note that when you compile the I386 static library to exit the console after entering the edit
ARMv7
Execute the following command:
$ arch='-arch armv7' ./configure-iphone$ make dep && do clean && make$. /copylibs.sh armv7//This command is a script that copies the compiled. A files to the specified directory
Of course, if you're not familiar with the scripting language, you'll be prompted not to do so./copylibs.sh
armv7s
$ arch='-arch armv7s' ./configure-iphone$ make dep && do clean && make$ . /copylibs.sh armv7s//This command is a script that copies the compiled. A files to the specified directory
Of course, if you're not familiar with the scripting language, you'll be prompted not to do so./copylibs.sh
Arm64
$ arch='-arch arm64' ./configure-iphone$ make dep && do clean && make$. /copylibs.sh arm64//This command is a script that copies the compiled. A files to the specified directory
Of course, if you're not familiar with the scripting language, you'll be prompted not to do so./copylibs.sh arm64
All the static libraries have been completed as described above and of course there are links compiled by others in this
: Https://github.com/chebur/pjsip
iOS Pjsip Static Library compilation (i)