Steps to Compile PJSIP latest version 1.10
STEP 1. Download source code from one of the following link :
http://www.pjsip.org/download.htm
http://trac.pjsip.org/repos/wiki/Getting-Started/Download-Source
STEP 2. Set your config_site.h to the following:
#define PJ_CONFIG_IPHONE 1
http://www.pjsip.org/download.htm
http://trac.pjsip.org/repos/wiki/Getting-Started/Download-Source
STEP 2. Set your config_site.h to the following:
#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>
The pjlib/include/pj/config_site.h contains local customizations to the libraries. The simplest way is just to create an empty file, to use whatever default values set by the libraries. Or copy and paste the config_site_sample.h file and delete all its content and copy above two lines.
This will activate iPhone specific settings in the config_site_sample.h.
Note: When the Makefile based build system is used, this process is taken care by the Makefiles. But when non-Makefile based build system (such as Visual Studio) is used, the config_site.h file must be created manually.
The pjlib/include/pj/config_site.h contains local customizations to the libraries. The simplest way is just to create an empty file, to use whatever default values set by the libraries. Or copy and paste the config_site_sample.h file and delete all its content and copy above two lines.
This will activate iPhone specific settings in the config_site_sample.h.
Note: When the Makefile based build system is used, this process is taken care by the Makefiles. But when non-Makefile based build system (such as Visual Studio) is used, the config_site.h file must be created manually.
Just run:
$ cd /path/to/your/pjsip/dir
$ ./configure-iphone
Their may be following problems:
Their may be following problems:
- Permission denied
$ su
Password:
# chmod 777 configure-iphone
# chmod 777 configure-iphone
# exit
The permission to the file configure-iphone will be set as rwx (read-write-execute) for all.
- Again running the ./configure-iphone may give following error
(This error may come because in the configure-iphone file every line may have been appended by a character $ or may be a carriage return symbol)
To check this do as:
- Run command
$ vim configure-iphone
(It wil open the vim editor)
To see the last character press escape(ESC:)set list
To quit vim press Esc:q
- To Eliminate
$ tr -d '\r' <configure-iphone >FILE.new
To check this do as:
- Run command
$ vim configure-iphone
(It wil open the vim editor)
To see the last character press escape(ESC:)set list
To quit vim press Esc:q
- To Eliminate
$ tr -d '\r' <configure-iphone >FILE.new
(It will create new file with name FILE. Now after that delete the configure-iphone file and rename FILE to configure-iphone using the following commands:)
$ rm configure-iphone
$ mv FILE.new configure-iphone
$ rm configure-iphone
$ mv FILE.new configure-iphone
(Again confirm that new created file has 777 permission if no then assign from su- super user)
- Again run
$ ./configure-iphone
- $ cd .. (Go to the parent folder in which the PJSIP folder lies)
- $ su (login as super user)
- # chmod 777 * (It will assign 777 permission to the whole folder and its content)
Again run $ ./configure-iphone command. This time every thing should work fine.
STEP 4. After getting message "Done configuring for iPhoneOS4.1.sdk" run following command
- Again run
$ ./configure-iphone
- Again there may be error in ./aconfigure: Permission denied
- $ cd .. (Go to the parent folder in which the PJSIP folder lies)
- $ su (login as super user)
- # chmod 777 * (It will assign 777 permission to the whole folder and its content)
Again run $ ./configure-iphone command. This time every thing should work fine.
STEP 4. After getting message "Done configuring for iPhoneOS4.1.sdk" run following command
- $ make dep
STEP 5. If every thing is successfull then run following command
- $ make
(After executing above 5 steps successfully the C files will produce the object .o files for pjlib,pjmedia,pjnath etc. and there .a liabraries that are included into the project and used.)
STEP 5. If every thing is successfull then run following command
- $ make
(After executing above 5 steps successfully the C files will produce the object .o files for pjlib,pjmedia,pjnath etc. and there .a liabraries that are included into the project and used.)