1,安装mingw
2,在mingw中安装:msys-base,mingw32-gcc,mingw32-gcc-g++和mingw32-libz
把mingw的bin目录(如C:\MinGW\bin)添加到系统环境变量path
3,解压pjsip2.3.0,在pjsip目录下(如D:\pjproject-2.3\pjlib\include\pj)创建config_site.h
4,创建msys目录下的fstab文件(如C:\MinGW\msys\1.0\etc),添加内容:如d:/pjproject-2.3 /pjsip
5,启动msys.bat
cd /pjsip
./configure
make dep
make
6,安装pjsua
安装python2.7.7
将python目录(如C:\Python27)添加到系统环境变量path
cd /pjsip/pjsip-apps/src/python
python setup.py build_ext --compiler=mingw32 install
7,安装pjsua2
下载swig,将swig目录(如D:\swigwin-3.0.2)添加到系统环境变量path
cd /pjsip/pjsip-apps/src/swig
make
make install
8,测试安装是否成功
在cmd里启动python,输入:
import pjsua
import pjsua2
注1:修改完系统环境变量path后,要重新打开msys
注2:相关下载
mingw: http://sourceforge.net/projects/mingw/files/
pjsip: http://www.pjsip.org/release/2.3/pjproject-2.3.zip
python: https://www.python.org/ftp/python/2.7.7/python-2.7.7.msi
swig: http://prdownloads.sourceforge.net/swig/swigwin-3.0.2.zip