Building PJSUA2
The PJSUA2 C++ library is built by default by PJSIP build system. Standard C++ library is required.
The following sections applies to building SWIG Python, Java, or C# modules.
Common Requirements
On Linux/MacOS X/Unix, you need to build PJPROJECT with
-fPICoption. You can either put it inuser.makfile in root pjproject directory like this:CFLAGS += -fPIC
or you can specify it when calling
configure:./configure CFLAGS="-fPIC"
Then rebuild pjproject.
Install SWIG
For Debian based distributions (such as Ubuntu):
sudo apt-get install swig
For Windows and other platforms please see https://www.swig.org/download.html
Building Python SWIG Module
Install SWIG as shown above.
Install Python development package:
For Debian based distributions (such as Ubuntu):
sudo apt-get install python3-dev
For other platforms, TBD.
Build:
cd pjsip-apps/src/swig/python make make installNote
The above will install the module to user’s
site-packagesdirectory.If you’re currently on a virtualenv, run
python setup.py installinstead.Test the installation:
$ python3 > import pjsua2 > ^Z
Building Java SWIG Module
Install SWIG as shown above.
Install JDK.
Build:
cd pjsip-apps/src/swig/java make make installTBD.
Building C# SWIG Module
Install SWIG as shown above.
Install .. (TBD)
Build:
cd pjsip-apps/src/swig/csharp make make installTBD.