Compiling PJSIP

Compiling PJSIP


Steps to Compile PJSIP latest version 1.10

STEP 1. Download source code from one of the following link :



STEP 2. Set your config_site.h to the following:

#define PJ_CONFIG_IPHONE 1 
#include  

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.
STEP 3. To Build PJSIP
Just run:
$ cd /path/to/your/pjsip/dir
$ ./configure-iphone 

Their may be following problems: 

  • Permission denied 
       Solution: login as super user using su command and the type following command
       $ su
       Password:
       # 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 
        -bash: ./configure-iphone: /bin/bash^M: bad interpreter: No such file or directory

(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' 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
(Again confirm that new created file has 777 permission if no then assign from su- super user)

        - Again run
        $ ./configure-iphone

  • Again there may be error in ./aconfigure: Permission denied 
        Solution : Assign 777 permission to the whole folder. 
       - $ 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.)

什麼都不是

感恩師佛的加持與教導

感恩所有的佛菩薩護法金剛的加持與教導
--------------------------------------------------------
自己什麼都不是,也不是什麼。

來首『什麼都不是的什麼』

夢來夢去,何處停留?
追來追去,何物長久?

怨天怨地,誰是阿我?
讚天讚地,誰是阿我?
歡天喜地,誰是阿我?

何物能長久?何事能停留?

我是什麼!什麼是我!

光明心中流,流入大性海。


虹光大成就-密教灌頂(一)