-
Notifications
You must be signed in to change notification settings - Fork 60
Home
Chakrit Wichian edited this page Jul 12, 2014
·
3 revisions
To get PJSIP building on your machine, read the following 2 links which should be PJSIP's official building instructions:
- http://trac.pjsip.org/repos/wiki/Getting-Started/Build-Preparation — General build preparation instruction.
- http://trac.pjsip.org/repos/wiki/Getting-Started/iPhone — iPhone-specific build flags.
For the lazy, this works for building with SDK 7.1 as of commit b0af6c8 :
$ echo "#define PJ_CONFIG_IPHONE 1" > pjlib/include/pj/config_site.h
$ echo "#include <pj/config_site_sample.h>" >> pjlib/include/pj/config_site.h
$ cat pjlib/include/pj/config_site.h
#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>
$ ARCH="-arch armv7s" ./configure-iphone
$ make dep
$ make clean
$ make
This should produce working static library files for each PJSIP component. You can verify by running the following set of commands:
$ find **/*.a
pjlib-util/lib/libpjlib-util-arm-apple-darwin9.a
pjlib/lib/libpj-arm-apple-darwin9.a
pjmedia/lib/libpjmedia-arm-apple-darwin9.a
pjmedia/lib/libpjmedia-audiodev-arm-apple-darwin9.a
pjmedia/lib/libpjmedia-codec-arm-apple-darwin9.a
pjmedia/lib/libpjmedia-videodev-arm-apple-darwin9.a
pjmedia/lib/libpjsdp-arm-apple-darwin9.a
pjnath/lib/libpjnath-arm-apple-darwin9.a
pjsip/lib/libpjsip-arm-apple-darwin9.a
pjsip/lib/libpjsip-simple-arm-apple-darwin9.a
pjsip/lib/libpjsip-ua-arm-apple-darwin9.a
pjsip/lib/libpjsua-arm-apple-darwin9.a
pjsip/lib/libpjsua2-arm-apple-darwin9.a
third_party/lib/libg7221codec-arm-apple-darwin9.a
third_party/lib/libgsmcodec-arm-apple-darwin9.a
third_party/lib/libilbccodec-arm-apple-darwin9.a
third_party/lib/libresample-arm-apple-darwin9.a
third_party/lib/libspeex-arm-apple-darwin9.a
third_party/lib/libsrtp-arm-apple-darwin9.a
You can now directly link those files into your project, import some PJSIP headers and start writing your application.